1.0.0 • Published 10 years ago
ember-redirect-to v1.0.0
Ember-redirect-to 
Ever confused by when to use this.transitionTo
and this.replaceWith
in the redirect
while trying to preserve history?
...Me too...
This addon makes this.redirectTo
available in Routes, which appears to always do the right things.
Usage
ember install ember-redirect-to
In the route you wish to "alias" to another.
// routes/index.js
export default Route.extend({
redirect() {
// redirects / -> dashboard
// correctly chooses transitionTo or replaceWith to ensure the expected history
this.redirectTo('dashboard');
}
})