Tag Archives: Directive

Little Known Ways to Include Static Content in a Directive


via Little Known Ways to Include Static Content in a Directive.

A dialog box, to display messages to the user, is a very common utility. It is also a very common mentoring session. The reasons are extensive, but the most common are:

  • As a developer, you need to supply the content dynamically, but you want it to be reusable; and
  • You want to tie in eventing so you can execute actions on button clicks (e.g. close, yes, no); and
  • You want to ensure the style of the dialog is settable via a single property (e.g. warning, info, error); and
  • You want to be able to do this via JavaScript or markup.