Skip to content

leoeuclids/ember-route-helpers

 
 

Repository files navigation

ember-route-helpers Build Status GitHub version Dependency Status

Transition into routes with helpers directly on template.

(transition-to 'destination' model (query-params foo='bar'))

(transition-to) helper that receives the same argument signature as link-to but evaluates to an action that can be called to trigger transition.

<button {{action (transition-to 'index')}}>Go to Index</button>

(replace-with 'destination' model (query-params foo='bar'))

(replace-with) helper that transition into another route while replacing the current URL, if possible. This will replace the current history entry instead of adding a new one. Beside that, it is identical to transitionTo in all other respects.

<button {{action (replace-with 'index')}}>Go to Index</button>

(transition-to-external 'destination' (query-params foo='bar'))

(transition-to-external) helper that transition from an Engine to an external route.

<button {{action (transition-to-external 'parent-index' (query-params foo='bar'))}}>Go to Index</button>

(replace-with-external 'destination' (query-params foo='bar'))

(replace-with-external) helper that transition (replacing) from an Engine to an external route.

<button {{action (replace-with-external 'parent-index' (query-params foo='bar'))}}>Go to Index</button>

Installation

ember install ember-route-helpers

About

Transition into routes with helpers directly on template

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 85.0%
  • HTML 15.0%