angular-flash

Flash messages for Angular.js
Homepage:
15 people use it

angular-flash

Flash messages for Angular.js.

Supports view changes, which means you can set a flash message, navigate to another view and your message will be displayed.

Usage

After adding angular-flash.js to your project, add flash as a dependency to your module. Here is a simple example:

Then, in your HTML, simply add the <flash-messages> element where you want your messages to be displayed. It can be in your main template or individual partials.

Examples

  • flash('My message')
  • flash([ 'Hi!', 'My message' ])
  • flash('error', 'Something went wrong…')
  • flash([ 'Hi!', { level: 'warning', text: 'This is a warning!' } ])

License

This is licensed under the feel-free-to-do-whatever-you-want-to-do license.

comments powered by Disqus
This page was last updated over 3 years ago.