Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

ember-cli-flash-messages

dvg11MITdeprecated0.1.1

This package is deprecated, please use https://www.npmjs.com/package/ember-cli-flash instead

Easy Flash Messages for your Ember CLI Application

ember-addon

readme

Ember CLI 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 ember-cli-flash-messages --save

Usage

Templates

{{#each flash in flashes.content}}
  {{flash-message flash=flash}}
{{/each}}

Controllers

actions: {
  postComment: function(){
    this.get('flashes').success('Comment posted');
    // this.get('flashes').danger('Failed to post comment.');
    // info and warning are also possibilities
  }
}