diff --git a/README.md b/README.md index 2bbd5be..58e3312 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,8 @@ # ember-href-to -A lightweight alternative to `{{link-to}}`. No components, no class bindings - just a bound anchor href and a click handler. +This add-on: +- Intercepts all `` tags, performing in-app route transitions if recognized, normal links otherwise. +- Provides an `{{href-to}}` helper as a lightweight alternative to `{{link-to}}`. No components, no class bindings - just a bound anchor href and a click handler. [![Build Status](https://travis-ci.org/intercom/ember-href-to.svg)](https://travis-ci.org/intercom/ember-href-to) [![Ember Observer Score](http://emberobserver.com/badges/ember-href-to.svg)](http://emberobserver.com/addons/ember-href-to) @@ -18,7 +20,9 @@ This is an Ember CLI addon, to install: ## Usage Instructions -`{{href-to}}` has the same interface as [`{{link-to}}`](https://guides.emberjs.com/v2.16.0/templates/links/), you can use it to link to static and dynamic routes in your ember application: +Once installed, this add-on will automatically intercept all `` tags. Once clicked, if the href url is recognized as a route found within the current Ember application, it will perform an Ember transition without a page refresh. If not, it will link to the url as a normal anchor tag. + +You can use the `{{href-to}}` helper, which has the same interface as [`{{link-to}}`](https://guides.emberjs.com/release/routing/linking-between-routes/), to link to static and dynamic routes in your ember application: ```html Go Home @@ -33,6 +37,8 @@ This is an Ember CLI addon, to install: ``` +**WARNING: This add-on intercepts _all_ `` tags, not just ones that use the `{{href-to}}` helper. Be careful to check that external urls are still working correctly.** + 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](https://cloud.githubusercontent.com/assets/2526/8709271/0a8b934a-2b39-11e5-8f24-89ece7d6c45d.gif)