After the overuse of modal dialogs in Windows, and alert boxes in early browser applications, modal dialogs have left a bad taste with some developers. However, when used appropriately, they are simple and powerful tools. Durandal's modal dialog implementation makes collecting user input from modals very easy, by making dialogs return promises that resolve when they close. Modal dialogs in Durandal come in two types, namely, message boxes and custom dialogs.
For simple cases such as displaying a notification or collecting a single piece of user input, Durandal provides a modal dialog on
app.showMessage, which takes the following parameters:
Message (string): This contains the main contents of the message box.
Title (string, ...