0
以下是使用Angular UI-bootstrap的選項卡的實現。我想包括一些功能來關閉打開的選項卡。有沒有辦法可以做到這一點。 https://angular-ui.github.io/bootstrap/#/tabs關閉Angular-UI選項卡
以下是使用Angular UI-bootstrap的選項卡的實現。我想包括一些功能來關閉打開的選項卡。有沒有辦法可以做到這一點。 https://angular-ui.github.io/bootstrap/#/tabs關閉Angular-UI選項卡
你可以把它放在collapse? 您希望您的網站如何反應?否則,你將不得不編寫自己的指令。
下面是一個例子:
的index.html
<!doctype html>
<html ng-app="ui.bootstrap.demo">
<head>
<script src="//ajax.googleapis.com/ajax/libs/angularjs/1.5.3/angular.js"></script>
<script src="//ajax.googleapis.com/ajax/libs/angularjs/1.5.3/angular-animate.js"></script>
<script src="//angular-ui.github.io/bootstrap/ui-bootstrap-tpls-1.3.3.js"></script>
<script src="example.js"></script>
<link href="//netdna.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" rel="stylesheet">
</head>
<body>
<div ng-controller="CollapseDemoCtrl">
<button type="button" class="btn btn-default" ng-click="isCollapsed = !isCollapsed">Toggle collapse</button>
<hr>
<div uib-collapse="isCollapsed">
<div class="well well-lg">**your tabs inside of this**</div>
</div>
</div>
</body>
</html>
example.js
angular.module('ui.bootstrap.demo', ['ngAnimate', 'ui.bootstrap']);
angular.module('ui.bootstrap.demo').controller('CollapseDemoCtrl', function ($scope) {
$scope.isCollapsed = false;
});
我要說的是,OP還沒有告訴我們,但他並不打算這樣做 - 鏈接也與問題中的相同。但我會更新帖子。 – Zoba