spModal - alert(String message).then(fn)

Displays an alert.

Table 1. Parameters
Name Type Description
message String The message to display.
Table 2. Returns
Type Description
Boolean The promise contains a single argument that contains true or false.
// HTML template 
<button ng-click="c.onAlert()" class="btn btn-default">
    Alert
  </button>

// Client script
function(spModal) {
    var c = this;
  c.onAlert = function () {
        spModal.alert('How do you feel today?').then(function (answer) {
            c.simple = answer;
        });
    }
 }