Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/dvg/flash-messages
Ember Addon to encapsulate flash-messages component presented here: https://medium.com/delightful-ui-for-ember-apps/adding-flash-messages-to-an-ember-app-437b13e49c1b
https://github.com/dvg/flash-messages
Last synced: 14 days ago
JSON representation
Ember Addon to encapsulate flash-messages component presented here: https://medium.com/delightful-ui-for-ember-apps/adding-flash-messages-to-an-ember-app-437b13e49c1b
- Host: GitHub
- URL: https://github.com/dvg/flash-messages
- Owner: DVG
- License: mit
- Created: 2014-12-02T14:17:29.000Z (almost 10 years ago)
- Default Branch: master
- Last Pushed: 2014-12-02T14:47:38.000Z (almost 10 years ago)
- Last Synced: 2024-04-14T03:59:46.485Z (7 months ago)
- Language: JavaScript
- Size: 125 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# Flash-messages
This addon allows you to manage flash messages in your ember application. The original code for this comes from the blog entry here by Lauren Elizabeth Tan (@sugarpirate): https://medium.com/delightful-ui-for-ember-apps/adding-flash-messages-to-an-ember-app-437b13e49c1b
I'm mostly packaging this up for convenience for myself.
## Installation
* `npm install flash-messages --save`
## Usage
### Templates
```hbs
{{#each flash in flashes.content}}
{{flash-message flash=flash}}
{{/each}}
```### Controllers
```javascript
actions: {
postComment: function(){
this.get('flashes').success('Comment posted');
// this.get('flashes').danger('Failed to post comment.');
// info and warning are also possibilities
}
}
```