0
我試圖做類似this(can be done in simple jQuery+ bootstrap)
UI引導標籤標題
但我怎樣才能angularjs(1.x中)和UI,引導 它看起來像基本實現這個UI像this
Controller.js
var myApp = angular.module('myApp', ['ui.bootstrap']);
myApp.controller("homeCtrl", function ($scope) {
$scope.tabs = [{
title: 'Dynamic Title 1',
content: 'Dynamic content 1'
},
{
title: 'Dynamic Title 2',
content: 'Dynamic content 2',
},
{
title: 'Dynamic Title 3',
content: 'Dynamic content 3',
},
{
title: 'Dynamic Title 4',
content: 'Dynamic content 4',
}
];
});
的Html
<uib-tabset active="active">
<uib-tab index="0" heading="Static title">Static content</uib-tab>
<uib-tab index="$index+1" ng-repeat="tab in tabs track by $index">
<uib-tab-heading>
{{tab.title}}
<div class="close" aria-label="Close" ng-click="remove($index, $event)">
<span aria-hidden="true">×</span>
</div>
</uib-tab-heading>
{{tab.content}}
</uib-tab>
</uib-tabset>
對不起,我的英文不好,並在此先感謝。