用于connectOutlet的Ember路由和applicationController [英] Ember routing and applicationController used in connectOutlet

查看:178
本文介绍了用于connectOutlet的Ember路由和applicationController的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有这个工作示例,用于排除垃圾路由 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的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆