在EmberJS中注入控制器作为服务?

时间:2015-06-02 14:53:41

标签: ember.js dependency-injection

我有一个控制器,无法从特殊任务的路径到达。 许多路由都使用此控制器来执行这些任务。

目前我使用------WebKitFormBoundaryc6x6E9JewE0ln4ql Content-Disposition: form-data; name="live" on ------WebKitFormBoundaryc6x6E9JewE0ln4ql Content-Disposition: form-data; name="genus" test genus name ------WebKitFormBoundaryc6x6E9JewE0ln4ql Content-Disposition: form-data; name="species" test species name ------WebKitFormBoundaryc6x6E9JewE0ln4ql Content-Disposition: form-data; name="variety_name" test variety name ------WebKitFormBoundaryc6x6E9JewE0ln4ql-- 来获取它。

但由于它被用作其他控制器的服务,我想用DI添加到每条路径。

我在controllerFor()

中尝试了以下操作
Em.Application.initializer

哪个不起作用。

如何在Ember.js中正确注入控制器?

0 个答案:

没有答案
相关问题