spModal provides an alternative way to show alerts, prompts, and confirmation dialogs. Additionally you can use spModal.open() to display a widget in a modal dialog. spModal is a lightweight wrapper for angular UI bootstrap's $uibModal. See here for more info: https://angular-ui.github.io/bootstrap/#/modal

alert (message).then(fn)Alert a message. The promise contains a single argument that returns true/false.
confirm (message).then(fn)Display a confirmation message. The promise contains a boolean of the user's response.
prompt (message, defaultValue).then(fn)Prompt the user for input. Provide a message and an optional default value for the input field. The promise contains the user's response as a string.
open (object options).then(fn)Open a modal with a customized set of options. See the options table below.

Options object definition

titlestringemptygoes in header - can be HTML
messagestringemptygoes in the body - can be HTML
buttonsarrayCancel & OKbuttons to show on the dialog
inputboolfalseif true, shows an input field on the dialog
valuestringemptyThe value of the input field
widgetstringemptyThe Widget Id or sys_id to embed in the modal
widgetInputobjectnullAn object to send to the embedded widget as input
sharedobjectnullA client-side object to share data with the embedded widget client script
sizestringempty'sm' or 'lg'