已经有一个类似的 
 issue. 
  
 
假设以下路线:
App.Router.map(function (match) {
  match('/').to('index');
  match('/posts').to('posts',function (match) {
    match('/').to('postsIndex');
    match('/:post_id').to('post',function (match) {
      match('/comments').to('comments',function (match) {
        match('/').to('commentsIndex');
        match('/:comment_id').to('showComment');
      });
    });
  });
}); 
 是否可以访问ShowCommentRoute中的post_id和comment_id?否则我应该忘记我的模型中的复合键?
为什么CommentRoute#model(params)和CommentsIndexRoute参数始终为空?何时检索帖子的评论?
我的fiddle.
运行这个example(有控制台日志显示问题.
更新后经过一番调查:
只有PostRoute将有params.post_id.
只有ShowCommentRoute将具有params.comment_id,并且不会有params.post_id.
对于模型具有复合键的应用程序,这是不可接受的.如果我们逐步过渡到showComment,我们可以获取注释实例:
App.ShowCommentRoute = Ember.Route.extend({
  model: function(params) {
    var post_id = this.controllerFor('post').get('content.id');
    return App.Comment.find(post_id,params.comment_id);
  }
}); 
 但是如果我们直接访问/帖子/ 1 /评论/ 1,这不行.在这种情况下,this.controllerFor(‘post’)总是未定义.
>如果您有嵌套的路径与动态段,您不能访问这个段在* IndexRoute(在这个例子中的PostRoute和PostInderRoute)
>很快,在直接访问嵌套路由时,不可能获得父路由模型.
解决方法
 使用ember-1.0.0-rc.1,现在可以直接访问url访问父路由的模型. 
  
  
 
        App.ShowCommentRoute = Ember.Route.extend({
  model: function(params) {
    var post = this.modelFor('post');
    return App.Comment.find(post.get('id'),params.comment_id);
  }
});