Notification

Notifications are iOS-styled messages that appear at the top of the screen.



You can show a notification from any view simply by calling:

this.context.showNotification(message, type, autoclose)

Parameters

  • message - string containing the message
  • type - success, error or warning
  • autoclose - if false, the notification won't disapear until clicking the X

If you need to set a notification when a view is loaded, you can use localStorage:

localStorage.setItem('notification', JSON.stringify({
  type: 'warning',
  text: 'Your message',
  autoclose: true 
}));)