且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

Ember - 从控制器访问父路由的模型

更新时间:2023-12-02 08:49:58

在控制器中使用需要 >

in a controller you would use needs and then get it off the controller.

App.FooController = Ember.ObjectController.extend({
  needs:['userActions'],
  blah: function(){
    var userActionsModel = this.get('controllers.userActions.model');
  }
});

http://emberjs.jsbin.com/dofedehi/1/edit