Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

ember-href-to

Package Overview
Dependencies
Maintainers
3
Versions
42
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ember-href-to

A lightweight alternative to `{{link-to}}`

  • 0.0.8
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
2K
decreased by-72.01%
Maintainers
3
Weekly downloads
 
Created
Source

ember-href-to

A lightweight alternative to {{link-to}}. No views, no class bindings - just a bound anchor href and a click handler.

Why use it?

Every time you use a {{link-to}}, you create a view. 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 10x faster than {{link-to}} in Ember 1.13.4.

Questions? Ping me @gavinjoyce

Installation

This is an Ember CLI addon, to install:

npm install ember-href-to --save

Usage Instructions

{{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>

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:

href-to2

Development Instructions

  • git clone this repository
  • npm install
  • bower install

Running

Keywords

FAQs

Package last updated on 16 Jul 2015

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc