问题描述
我有这个工作示例 fiddle of ember routing http://jsfiddle.net/C7LrM/102/一个>
I have this working example fiddle of ember routing http://jsfiddle.net/C7LrM/102/
我想将 ApplicationController 更改为 ApplicationzController lije 这个 http://jsfiddle.net/C7LrM/102/
I want to change the ApplicationController to ApplicationzController lije this http://jsfiddle.net/C7LrM/102/
并打电话
router.get('applicationzController').connectOutlet('profile');
但它不起作用,ApplicationController 只是一个名字还是其他什么?我做错了什么.
but it doesnt work, is ApplicationController just a name or something more? What am i doing wrong.
我正在开发一个更大应用程序的单个组件,所以我喜欢将我的 componentController 放在我的堆栈顶部,并在我的组件内部使用路由/状态.
I am working on a single componenet of a bigger application, so i love to keep my componentController at the top of my stack, and use the routes/states internally for my component.
推荐答案
截至今天,根控制器预计为 applicationController
(硬编码到 ember 源...).所以你不能随意命名它.
As of today, the root controller is expected to be applicationController
(hard-coded into ember source...). So you are not free about naming it.
这篇关于connectOutlet 中使用的 Ember 路由和 applicationController的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!