I want re-transition my application when route not found, in my application route
export default Ember.Route.extend({
redirect: function(model, transition) {
if (transition.targetName == "not-found") {
var newPath = transition.intent.url //do some logic
this.transitionTo(newpath);
}
}
});
Question How to check if newPath
exist before I do this.transitionTo(newPath);
In API I found only private hasRoute
Aucun commentaire:
Enregistrer un commentaire