Skip to content

Latest commit

 

History

History
69 lines (47 loc) · 2.19 KB

README.md

File metadata and controls

69 lines (47 loc) · 2.19 KB

Ember Notification Center npm version Build Status Ember Observer Score

Ember Notification Center is an Ember addon for managing and displaying notification messages.

Installation

As an addon

  • ember install ember-notification-center

For development

  • git clone this repository
  • npm install
  • bower install

Usage

This addon provides an Ember Data notification model and a component for rendering such models.

The component can be used as follows, assuming that notifications is bound to an array of notification model instances:

{{#notification-list notifications=notifications}}
  Click me to view your notifications!
{{/notification-list}}

This will render a button that displays a list of notifications when clicked. A message and creation date is displayed for each message.

Notifications with the important property set to true receive the class important, while unseen notifications receive the additional class new.

The notifications are ordered by date, but important notifications are listed before ordinary ones. The maximum number of notifications to show is determined by the property numNotifications, which is 3 by default.

Below is an example of how the notification list can look when styled.

Example of styled notification list

You can also specify the header property which will add a header to the notifications list.

{{#notification-list
  header="Notification Header"
  notifications=notifications}}
  ...
{{/notification-list}}

Running Tests

  • npm test (Runs ember try:testall to test the addon against multiple Ember versions)
  • ember test
  • ember test --server

Building

  • ember build

For more information on using ember-cli, visit http://www.ember-cli.com/.