bootstrap怎么配合?
用angular渲染bootstrap中的tab切換的思路:先加載scope中的tabs,然后利用后臺bootstrap渲染即可。
1、angularjs代碼:angular.module('TabsApp', []).controller('TabsCtrl', ['$scope', function ($scope) {$scope.tabs = [{title: 'One',url: 'one.tpl.html'}, {title: 'Two',url: 'two.tpl.html'}, {title: 'Three',url: 'three.tpl.html'}];$scope.currentTab = 'one.tpl.html';$scope.onClickTab = function (tab) {$scope.currentTab = tab.url;}$scope.isActiveTab = function(tabUrl) {return tabUrl == $scope.currentTab;}}]);
2、渲染效果:
上一篇安裝CAD轉換路徑無效
下一篇如何給byte賦值