Ember.js 路由转换调用的事件序列

Ember.js 路由转换调用的事件序列,ember.js,Ember.js,我正试着在ember中围绕转换调用的事件序列进行思考 我的路由器如下所示: App.Router.map(function() { this.resource('store', {path: 'store/:store_id'} , function(){ this.route("index", { path: "/" }); this.resource('client', function(){ this.route("signo

我正试着在ember中围绕转换调用的事件序列进行思考

我的路由器如下所示:

App.Router.map(function() {
    this.resource('store', {path: 'store/:store_id'} , function(){
        this.route("index", { path: "/" });
        this.resource('client', function(){
            this.route("signout");
        });
    });
});
在注销期间,我清除了所有内容,然后返回到store.index。但是,执行此操作时,不会刷新任何内容,也不会调用StoreIndexRoute的模型和setupController挂钩

让StoreIndexRoute自行重置的最佳方法是什么


另外,任何解释这些事件顺序的资源都将非常棒。

将以下内容添加到代码中,然后在查看控制台的同时运行。您将能够看到路由转换的详细说明,这将使您更容易理解发生了什么以及何时发生:

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
});