【发布时间】:2014-03-19 12:18:45
【问题描述】:
当 i.typ 改变时,ng-switch 不会在下面的代码中更新。也许这与开关之外的 ng-repeat 有关?在页面重新加载时它有效,但在模型更改时无效。
<div id="sceneCtrl" ng-controller="SceneController">
<transform id="{{'annotation'+i.ID}}" ng-repeat="i in vm.sharedService.SceneAnnotations">
<group ng-switch on="{{i.typ}}">
<transform ng-switch-when="0" > [subtree 0...] </transform>
<transform ng-switch-when="1" > [subtree 1...] </transform>
</group>
</transform>
</div>
【问题讨论】:
标签: angularjs ng-repeat ng-switch