tabs.html
1.14 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8" />
<title></title>
<style>
.container > div {
margin-bottom: 10px;
}
</style>
</head>
<body>
<div ng-app="esNgAntd" ng-controller="mainCtrl">
<div class="container" style="padding: 50px">
<es-tabs on-change="handleChange(key)" default-active-key="0">
<es-tab-pane tab="{{name}}" key="0"></es-tab-pane>
<es-tab-pane tab="bbb" key="1"></es-tab-pane>
<es-tab-pane tab="ccc" key="2"></es-tab-pane>
</es-tabs>
</div>
</div>
<script src="https://cdn.staticfile.org/angular.js/1.2.28/angular.min.js"></script>
<script src="../dist/ng-antd.js"></script>
<script>
angular
.module("esNgAntd")
.controller("mainCtrl", function ($scope, $timeout) {
$scope.name = "aaa";
$scope.handleChange = function(key) {
console.log(key)
}
// $timeout(()=>{
// $scope.name="ddd"
// }, 2000)
});
</script>
</body>
</html>