Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
ember-paper-link
Advanced tools
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-link 'My route' 'my-route'}}
{{#paper-list}}
{{#paper-link-item 'my-route'}}
<p>Go to My route</p>
{{/paper-link-item}}
{{/paper-list}}
paper-button
and paper-item
both accept an href
attribute for link functionality. For internal links the ember-href-to addon is recommended:
{{#paper-button href=(href-to "index")}}
Home
{{/paper-button}}
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 install ember-paper-link
Don't forget to import your styles in your app.scss
after importing ember paper styles:
@import "ember-paper";
@import "ember-paper-link";
{{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:
{{paper-link 'My route' 'my-route' model raised=true}}
{{#paper-link-item as |controls|}}
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:
{{#paper-link-item 'my-route' model class="md-2-line" as |controls|}}
<img src={{item.img}} alt={{item.name}} class="md-avatar">
<div class="md-list-item-text">
<h3>{{item.name}}</h3>
<p>{{item.email}}</p>
</div>
{{/paper-link-item}}
npm run lint:hbs
npm run lint:js
npm 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 versionsember serve
This project is licensed under the MIT License.
FAQs
The default blueprint for ember-cli addons.
The npm package ember-paper-link receives a total of 0 weekly downloads. As such, ember-paper-link popularity was classified as not popular.
We found that ember-paper-link demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.