I have nested routes defined in my Ember app (Ember 2) as below;
this.route('main', function() {
this.route('step1', function(){
this.route('step1A');
});
});
Now I want to navigate to the child route & want to trigger the 'model' hook So I have
var routeName = 'main.step1.step1A';
self.transitionTo(routeName); //Tried Option1
self.get('controller').transitionToRoute(routeName); //Tried Option2
My question is while I do see the URL change, the 'model' hook does not get triggered.
How do I force the 'model' hook to be triggered ?
As per the doc, I think the rule is for routes with dynamic segments. But my route is a simple route.
setupController()
? It is always run and as long as you can show no data first and update the template later, this could be one alternative. – Pavolmodel()
hook? You don't have to use it, of course. – PavolsetupContoller()
being fired could be that Ember generates it for you, if you don't have it. Do you have workflow.step1.step1A controller? – Pavol