https://github.com/aackerman/ember-flash-queue
Client-side flash queue for Ember applications
https://github.com/aackerman/ember-flash-queue
Last synced: 10 months ago
JSON representation
Client-side flash queue for Ember applications
- Host: GitHub
- URL: https://github.com/aackerman/ember-flash-queue
- Owner: aackerman
- License: mit
- Created: 2013-10-02T00:31:34.000Z (over 12 years ago)
- Default Branch: master
- Last Pushed: 2014-07-14T21:16:14.000Z (almost 12 years ago)
- Last Synced: 2025-07-27T16:25:07.637Z (11 months ago)
- Language: JavaScript
- Size: 258 KB
- Stars: 4
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# ember-flash-queue

A client side flash queue similar to the Rails flash queue. For use with Ember. Completely ready to drop into an application, styling included. Or you can roll your own styling to better fit your application.
You can view a complete demo [here on jsbin](http://emberjs.jsbin.com/ember-flash-queue/latest).
Assumes `App` namespace by default. With options for scheduling 'destruction' of flashes. Allowing flashes to be dismissable by the user. And four different color schemes for alerts, info, notices, and warnings.
The necessary Handlebars can be placed in your application template.
```html
{{#each App.flashQueueController}}
{{view App.FlashMessageView}}
{{/each}}
```
The main interface.
```js
App.flashQueueController.flash('notice', 'Hello World!');
```
Or even easier alias `flash` to the top level namespace.
```js
// for ES5 environments
App.flash = App.flashQueueController.flash.bind(App.flashQueueController);
// for ES3 environments
App.flash = function(type, message) {
App.flashQueueController.flash(type, message);
}
```
And now you can flash to your :heart:'s content
```js
App.flash('notice', '<3 EmberJS');
```
## Author
| [](http://twitter.com/_aaronackerman_ "Follow @_aaronackerman_ on Twitter") |
|---|
| [Aaron Ackerman](https://twitter.com/_aaronackerman_) |