Skip to main content
Version: 1.2.x

Message Box

The messageBox module is a simple implementation of a typical message or confirmation modal.

This module is a constructor function for an object that has the following signature function(message [, title, options]). The message will be displayed in the body of the dialog. You can use title to specify text in the title or header area. By default this has a value of "Application". You can specify a number of response options as well. This is an array of strings which defaults to a value of ['Ok']. When an option is selected by the user, the modal will be closed and the option will be passed to the promise. This module can be leveraged by using new to create an instance and then passing that instance to the modalDialog module's show function. However, a convenient helper method exists on the app module which does this for you. You can change the appearance of the message box through css or through altering messageBox.html.

note

You can customize the default title and options for all message boxes by setting the properties defaultTitle and defaultOptions on the message box constructor itself.