Reputation: 2747
I'm trying to wrap my head around the event sequence of transitionTo calls in ember.
My router looks as follows:
App.Router.map(function() {
this.resource('store', {path: 'store/:store_id'} , function(){
this.route("index", { path: "/" });
this.resource('client', function(){
this.route("signout");
});
});
});
During sign out I clear out everything and then transitionTo back to store.index however nothing gets refreshed when I do this and neither the model, nor setupController hook of StoreIndexRoute are recalled.
What is the best way to get StoreIndexRoute to reset itself?
Also any resources that explain the sequence of these events would be awesome.
Upvotes: 1
Views: 212
Reputation: 6427
Add the following to your code and then run while looking at your console. You'll be able to see a detailed explanation of routing transitions that will make it much easier to understand what is happening and when:
window.App = Ember.Application.create({
// Basic logging, e.g. "Transitioned into 'post'"
LOG_TRANSITIONS: true,
// Extremely detailed logging, highlighting every internal
// step made while transitioning into a route, including
// `beforeModel`, `model`, and `afterModel` hooks, and
// information about redirects and aborted transitions
LOG_TRANSITIONS_INTERNAL: true
});
Upvotes: 1