This is an ember-paper addon that extends ember's built in link-to helper and adds paper-button styling and functionality.
The paper-link component makes it easy to have buttons that display an 'active' state based on the current route. Exactly the same as link-to.
There is also a paper-link-item component that creates a list item with the same link-to functionality. Intended for use in nav lists.
| Version compatibility | ember-paper-link version |
|---|---|
| Ember 3.11.0+ or ember-paper 1.0.0-beta.27+ | ^1.0.0 |
| Ember < 3.11.0 or ember-paper < 1.0.0-beta.27 | 0.0.6 |
Example usage:
paper-button and paper-item both accept an href attribute for link functionality. For internal links the ember-href-to addon is recommended:
ember-href-to has the benefit of being 12x faster than link-to which is used internally by ember-paper-link.
The downside of ember-href-to is that it does not handle displaying an 'active' state based on the current route.
https://subtletree.github.io/ember-paper-link/
- Ember.js v3.12 or above
- Ember CLI v2.13 or above
- Node.js v10 or above
ember install ember-paper-linkDon't forget to import your styles in your app.scss after importing ember paper styles:
@import "ember-paper";
@import "ember-paper-link";Has the same api as link-to with the paper-button attributes added.
Make sure to add any link-to parameters before paper-button ones e.g:
Has the same api as paper-item with the link-to attributes added.
Make sure to add any link-to parameters before paper-item ones e.g:
npm run lint:hbsnpm run lint:jsnpm run lint:js -- --fix
ember test– Runs the test suite on the current Ember versionember test --server– Runs the test suite in "watch mode"ember try:each– Runs the test suite against multiple Ember versions
ember serve- Visit the dummy application at http://localhost:4200.
This project is licensed under the MIT License.