This repository was archived by the owner on May 29, 2019. It is now read-only.
File tree 5 files changed +7
-8
lines changed
5 files changed +7
-8
lines changed Original file line number Diff line number Diff line change 24
24
25
25
< hr />
26
26
27
- < tabset vertical ="true " type ="navType ">
27
+ < tabset vertical ="true " type ="pills ">
28
28
< tab heading ="Vertical 1 "> Vertical content 1</ tab >
29
29
< tab heading ="Vertical 2 "> Vertical content 2</ tab >
30
30
</ tabset >
Original file line number Diff line number Diff line change @@ -9,6 +9,4 @@ var TabsDemoCtrl = function ($scope) {
9
9
alert ( 'You\'ve selected the alert tab!' ) ;
10
10
} ) ;
11
11
} ;
12
-
13
- $scope . navType = 'pills' ;
14
12
} ;
Original file line number Diff line number Diff line change @@ -82,13 +82,14 @@ angular.module('ui.bootstrap.tabs', [])
82
82
restrict : 'EA' ,
83
83
transclude : true ,
84
84
replace : true ,
85
- scope : { } ,
85
+ scope : {
86
+ type : '@'
87
+ } ,
86
88
controller : 'TabsetController' ,
87
89
templateUrl : 'template/tabs/tabset.html' ,
88
90
link : function ( scope , element , attrs ) {
89
91
scope . vertical = angular . isDefined ( attrs . vertical ) ? scope . $parent . $eval ( attrs . vertical ) : false ;
90
92
scope . justified = angular . isDefined ( attrs . justified ) ? scope . $parent . $eval ( attrs . justified ) : false ;
91
- scope . type = angular . isDefined ( attrs . type ) ? scope . $parent . $eval ( attrs . type ) : 'tabs' ;
92
93
}
93
94
} ;
94
95
} )
Original file line number Diff line number Diff line change @@ -398,7 +398,7 @@ describe('tabs', function() {
398
398
beforeEach ( inject ( function ( $controller , $rootScope ) {
399
399
scope = $rootScope ;
400
400
//instantiate the controller stand-alone, without the directive
401
- ctrl = $controller ( 'TabsetController' , { $scope : scope , $element : null } ) ;
401
+ ctrl = $controller ( 'TabsetController' , { $scope : scope } ) ;
402
402
} ) ) ;
403
403
404
404
@@ -609,7 +609,7 @@ describe('tabs', function() {
609
609
scope = $rootScope . $new ( ) ;
610
610
scope . navType = 'pills' ;
611
611
612
- elm = $compile ( '<tabset type="navType"></tabset>' ) ( scope ) ;
612
+ elm = $compile ( '<tabset type="{{ navType}} "></tabset>' ) ( scope ) ;
613
613
scope . $apply ( ) ;
614
614
} ) ) ;
615
615
Original file line number Diff line number Diff line change 1
1
2
2
< div class ="tabbable ">
3
- < ul class ="nav {{type && 'nav-' + type }} " ng-class ="{'nav-stacked': vertical, 'nav-justified': justified} " ng-transclude > </ ul >
3
+ < ul class ="nav nav- {{type || 'tabs' }} " ng-class ="{'nav-stacked': vertical, 'nav-justified': justified} " ng-transclude > </ ul >
4
4
< div class ="tab-content ">
5
5
< div class ="tab-pane "
6
6
ng-repeat ="tab in tabs "
You can’t perform that action at this time.
0 commit comments