Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

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

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
}
}
```