Assuming I have a route that contains another route:
this.route('fields', function () {
this.route('details', { path: '/:field_name' });
});
Parent route:
redirect(model, transition) {
alert(transition.to.name);
},
Child route:
redirect(model, transition) {
if (something) this.transitionTo('fields');
},
It should alert twice when I reach the child route (since there is a redirection to parent route). It only alert once (before the redirection).
How can I re-trigger the parent redirect action?
Aucun commentaire:
Enregistrer un commentaire