Security News
Research
Data Theft Repackaged: A Case Study in Malicious Wrapper Packages on npm
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
ember-href-to
Advanced tools
A lightweight alternative to {{link-to}}
. No components, no class bindings - just a bound anchor href and a click handler.
Every time you use a {{link-to}}
, you create a component. This is usually fine, but in cases where you're creating many of these, performance can suffer. {{href-to}}
simply creates a URL and is 12x faster than {{link-to}}
in Ember 1.13.4.
Questions? Ping me @gavinjoyce
This is an Ember CLI addon, to install:
ember install ember-href-to
LinkTo
, which was introduced in Ember 3.27 and built using Glimmer components. See this comment for more info.{{href-to}}
has the same interface as {{link-to}}
, you can use it to link to static and dynamic routes in your ember application:
<a href="{{href-to 'index'}}">Go Home</a>
<a href="{{href-to 'contacts.contact' contact}}">View Contact 1</a>
<a href="{{href-to 'contacts.contact' 2}}">View Contact 2</a>
<a href="{{href-to 'contact-us' (query-params section='first')}}"
>You can also use query params</a
>
<a href="{{href-to 'contact-us'}}#first"
>You can also use fragment identifiers</a
>
<a href="{{href-to 'contact-us'}}" data-href-to-ignore>
If you have a catchall route (this.route('catchall', { path: "/*" })), you
need to add the attribute "data-href-to-ignore", otherwise you will always
match it
</a>
As {{href-to}}
simply generates a URL, you won't get automatic active
class bindings as you do with {{link-to}}
. Clicking on a {{href-to}}
URL will trigger a full router transition though:
git clone
this repositorynpm install
bower install
ember server
FAQs
A lightweight alternative to `{{link-to}}`
We found that ember-href-to demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers 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
Research
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
Research
Security News
Attackers used a malicious npm package typosquatting a popular ESLint plugin to steal sensitive data, execute commands, and exploit developer systems.
Security News
The Ultralytics' PyPI Package was compromised four times in one weekend through GitHub Actions cache poisoning and failure to rotate previously compromised API tokens.