我正在尝试在我的应用程序中使用 ng-switch。
In Routing configuration :
when('/Test/:TestName/formEditor/:openedFrom', {
templateUrl: 'Testing.html',
controller: 'TestCtrl'
})
在我的 HTML
<div ng-switch="openedFrom">
<ul class="breadcrumb" ng-switch-when="fromTab1">
<li><a href="#/solutions" id="act_
</ul>
<ul class="breadcrumb" ng-switch-when="fromTab2" >
<li><a href="#/abc">Visitors</a></li>
</ul>
</div>
我通过 Openedfrom 的方式是
<a class="btn btn-primary" href="#/Test/{{TestName}}/formEditor/fromTab1">Tab 1</a>
<a class="btn btn-primary" href="#/Test/{{TestName}}/formEditor/fromTab2">Tab 2</a>
面包屑根本不渲染。一旦我删除 ng-switch 一切似乎都可以正常工作。有人可以建议吗?