我有一个url localhost:3000 / apps,它由2个partials,listApps和createApps组成。下面是我的app.html代码,它注入了这两个部分。我想知道如何从一个部分切换到另一个部分并测试每个部分。我的主要问题是如何将tab设置为active并测试该部分或者你认为最适合测试它的内容。感谢
<div ng-include="'components/navbar/navbar.html'"></div>
<div class="container main-content" ng-controller="AppsCtrl">
<alert ng-repeat="alert in alerts" type="{{ alert.type }}" close="closeAlert($index)">{{ alert.msg }}</alert>
<ol class="breadcrumb">
<li><a href="/">Home</a></li>
<li><a href="/apps" class="active">My Applications</a></li>
</ol>
<tabset type="pills">
<tab ng-repeat="tab in tabs" heading="{{tab.title}}" active="tab.active" disabled="tab.disabled" ng-hide="tab.hidden">
<div ng-if="(tab.id == 'createApp')"><ng-include src="'app/apps/partials/create_app.html'"></ng-include></div>
<div ng-if="(tab.id == 'listApp')"><ng-include src="'app/apps/partials/list_app.html'"></ng-include></div>
</tab>
</tabset>
</div>
<div ng-include="'components/footer/footer.html'"></div>