Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/brian-gates/ember-alert
Simple mixin to help facilitate managing alerts in Ember.js
https://github.com/brian-gates/ember-alert
Last synced: 28 days ago
JSON representation
Simple mixin to help facilitate managing alerts in Ember.js
- Host: GitHub
- URL: https://github.com/brian-gates/ember-alert
- Owner: brian-gates
- Created: 2013-07-29T22:44:20.000Z (over 11 years ago)
- Default Branch: master
- Last Pushed: 2013-07-29T23:12:41.000Z (over 11 years ago)
- Last Synced: 2024-11-07T14:43:48.879Z (3 months ago)
- Language: JavaScript
- Size: 109 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
ember-alert
===========Simple mixin to help facilitate managing alerts in Ember.js
Usage:
Just include the mixin and call `alert`, `alertSuccess`, `alertError`, or `alertInfo` with your message. The message will be stored at `alerts`, `successes`, `errors`, or `infos` as appropriate and can be rendered as appropriate.
```javascript
App.ApplicationController = Ember.Controller.extend(App.Alert, {
init: function(){
this.alert("Here's an alert");
this.alert("And another");
this.alertSuccess('Something succeeded');
this.alertInfo('Some info');
this.alertError('Something failed');
}
});
```Live demo: http://jsbin.com/ayeder/1/edit