Ember.js How to get controller in needs which is nested controllerName

后端 未结 3 1444
感情败类
感情败类 2021-01-04 03:06

I want to use this.get(\'controllers.pack.query\'); to get App.PackQueryController in App.PackController, but failed.

I think

3条回答
  •  清歌不尽
    2021-01-04 03:37

    There's a newer, inject, syntax for same use case

    accountQueueController: Ember.inject.controller('account/queue'),
    ...
    this.get('accountQueueController.model.myProperty')
    

    source: http://discuss.emberjs.com/t/needs-with-nested-controller/8083/6

提交回复
热议问题