O'Reilly logo

Mastering KnockoutJS by Timothy Moran

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Custom modal dialogs

In Durandal, a dialog context is the viewmodel that controls a modal dialog. It has a method used to add the modal dialog host, which is the DOM node inside which the modal content will be placed.

Durandal offers two modal dialogs out of the box: message boxes and the default context. The message box that Durandal offers adds some simple DOM elements to the default context and is very useful in order to show short messages to the user. The default dialog context can host any composable module, including message boxes. If you want to use your own dialog box, such as the one included in Twitter Bootstrap, it is possible to add it as a dialog context.

A dialog context is an object that can create a dialog in the DOM to which the ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required