View/Alert

Alert.

Interface for creating alerts via show and dismiss. Also, this module keeps an internal dictionary of alerts created which can later be accessed by key. This is useful so that client code can dismiss a particular alert.

Note that the client application may provide custom implementation of the View/AlertView class. This implementation will be in charge of rendering the alert to its UI.

At minimum, a client app must provide:

  1. #alerts element in its index.html.
  2. A precompiled template called alert. The template can be compiled at application start-up: app.template.compile('alert', 'template body...');