angular-flash
Flash messages for Angular.js. Demo
Supports view changes, which means you can set a flash message, navigate to another view and your message will be displayed.
Install
bower install angular-flash-messages
Usage
After adding angular-flash.js
to your project, add flash
as a dependency to your module. Here is a simple example:
angular;
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.
Home
IE Support
If you need IE8 support (or prefer), you can use the attribute directive: <ol flash:messages></ol>
.
Examples
flash('My message')
My message
flash([ 'Hi!', 'My message' ])
Hi My message
flash('error', 'Something went wrong…')
Something went wrong…
flash([ 'Hi!', { level: 'warning', text: 'This is a warning!' } ])
Hi This is a warning!
License
This is licensed under the feel-free-to-do-whatever-you-want-to-do license.