If we add a simple button with action into i18redirect template, and handle it’s action in I18redirectRoute like so
App.I18redirectRoute = Ember.Route.extend({
events: {
test: function() {
this.transitionTo('page2');
}
}
});
everything works so transitionTo works. My guess is you’re handling transition in a wrong hook. We can use redirect hook (A hook you can implement to optionally redirect to another route.) but it is deprecated in favor of using the afterModel
. So
App.I18redirectRoute = Ember.Route.extend({
afterModel: function() {
this.transitionTo('page2');
}
});
now it works as expected.