emberjs router @pangratz示例类活动 [英] emberjs router @pangratz example class active

查看:75
本文介绍了emberjs router @pangratz示例类活动的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

@pangratz在 emberjs-如何给出答案标记使用路由器基础结构的活动菜单项

@pangratz give a answer in emberjs - how to mark active menu item using router infrastructure

问题是为什么当我更改 {{outlet navigation}} {{view App.NavigationView}} NavigationView.selected 是否未定义?

The question is why when i change {{outlet "navigation"}} to {{view App.NavigationView}}, NavigationView.selected is undefined?

推荐答案

我认为使用{{view App.NavigationView controllerBinding = App.router.navigationController}}应该可以使您的代码正常工作。感谢这个问题:connectOutlets来自初始化之前调用的根状态?

I think using {{view App.NavigationView controllerBinding="App.router.navigationController"}} should make your code working. Thanks to this question: connectOutlets from root state called before initialization?

这篇关于emberjs router @pangratz示例类活动的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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