【问题标题】:emberjs router @pangratz example class activeemberjs 路由器 @pangratz 示例类活动
【发布时间】:2012-07-30 19:35:29
【问题描述】:

@pangratz 在emberjs - how to mark active menu item using router infrastructure给出答案

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

【问题讨论】:

  • 我认为您可以删除此问题,因为它与您的其他问题确实相关:stackoverflow.com/questions/11760949/…。我会在这里很快回答。 Navigation.selected 是未定义的,因为不使用 outlet(因此不通过 connectOutlet),控制器的 selected 属性未设置,因此绑定未更新。

标签: ember.js router


【解决方案1】:

我认为使用 {{view App.NavigationView controllerBinding="App.router.navigationController"}} 应该可以使您的代码正常工作。感谢这个问题:connectOutlets from root state called before initialization?

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2017-11-15
    • 2012-07-22
    相关资源
    最近更新 更多