ember-route-helpers

3.0.0 • Public • Published

ember-route-helpers

Build Status GitHub version NPM version Dependency Status codecov Greenkeeper badge Ember Observer Score

Information

NPM

Transition into routes with helpers directly on template.

Requirements

  • Ember.js v4.0.1 or above
  • Ember CLI v4.4.0 or above
  • Node.js v14 or above

Installation

ember install ember-route-helpers

Usage

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

Contribute

If you want to contribute to this addon, please read the CONTRIBUTING.md.

Versioning

We use SemVer for versioning. For the versions available, see the tags on this repository.

Authors

See the list of contributors who participated in this project.

License

This project is licensed under the MIT License - see the LICENSE.md file for details

Package Sidebar

Install

npm i ember-route-helpers

Weekly Downloads

431

Version

3.0.0

License

MIT

Unpacked Size

19.5 kB

Total Files

26

Last publish

Collaborators

  • bbvaengineer
  • adrigzr
  • beatrizdemiguelperez
  • shokmaster
  • josex2r
  • amatiasvega
  • julianperezsam