• Onsen UI

    Utility methods to create different kinds of alert dialogs. There are three methods available:

    • ons.notification.alert()
    • ons.notification.confirm()
    • ons.notification.prompt()

    It will automatically display a Material Design dialog on Android devices.

    Click here to see the original article

  • I’m not sure if this is inherently known, but it’s important to note that when using the confirm notification, we must know which option the user has chosen to execute logic based on the response. In the options.callback we need to identify (document) the parameter for a positive or negative response. Such as:

    options: {
      callback: function(isOkChosen) {
        if (isOkChosen)  {  } else { } 

Log in to reply