ember-messages
/
3.5.4
ember-messages 3.5.4
Install from the command line:
Learn more about npm packages
$ npm install @zestia/ember-messages@3.5.4
Install via package.json:
"@zestia/ember-messages": "3.5.4"
About this version
This Ember addon provides a component for rendering messages, which can optionally be dismissed by the user.
Additionally, messages can be flashed using the flash message service.
ember install @zestia/ember-messages
Add the following to ~/.npmrc
to pull @zestia scoped packages from Github instead of NPM.
@zestia:registry=https://npm.pkg.github.com
//npm.pkg.github.com/:_authToken=<YOUR_GH_TOKEN>
https://zestia.github.io/ember-messages
- Dismissible messages ✔︎
- Flash message queue ✔︎
- Scroll into view ✔︎
- This package intentionally does not come with any styles.
- It is configured with ember-test-waiters so
await
ing in your test suite will just work.
Optional. Sets a data attribute on the message DOM element.
Optional. When provided, the message becomes dismissible. This action is fired after a message has been dismissed and any animations have finished.
This addon comes with a service for managing a queue of flash messages
Example
@inject('flash-message') flashMessageService;
// ...
this.flashMessageService.add('error', 'Something went wrong!');
They can be rendered as below. When a message is added, it will be scrolled into view.