This repository was archived by the owner on May 29, 2019. It is now read-only.
File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2424
2525 < hr />
2626
27- < tabset vertical ="true " type ="navType ">
27+ < tabset vertical ="true " type ="pills ">
2828 < tab heading ="Vertical 1 "> Vertical content 1</ tab >
2929 < tab heading ="Vertical 2 "> Vertical content 2</ tab >
3030 </ tabset >
Original file line number Diff line number Diff line change @@ -9,6 +9,4 @@ var TabsDemoCtrl = function ($scope) {
99 alert ( 'You\'ve selected the alert tab!' ) ;
1010 } ) ;
1111 } ;
12-
13- $scope . navType = 'pills' ;
1412} ;
Original file line number Diff line number Diff line change @@ -82,13 +82,14 @@ angular.module('ui.bootstrap.tabs', [])
8282 restrict : 'EA' ,
8383 transclude : true ,
8484 replace : true ,
85- scope : { } ,
85+ scope : {
86+ type : '@'
87+ } ,
8688 controller : 'TabsetController' ,
8789 templateUrl : 'template/tabs/tabset.html' ,
8890 link : function ( scope , element , attrs ) {
8991 scope . vertical = angular . isDefined ( attrs . vertical ) ? scope . $parent . $eval ( attrs . vertical ) : false ;
9092 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' ;
9293 }
9394 } ;
9495} )
Original file line number Diff line number Diff line change @@ -398,7 +398,7 @@ describe('tabs', function() {
398398 beforeEach ( inject ( function ( $controller , $rootScope ) {
399399 scope = $rootScope ;
400400 //instantiate the controller stand-alone, without the directive
401- ctrl = $controller ( 'TabsetController' , { $scope : scope , $element : null } ) ;
401+ ctrl = $controller ( 'TabsetController' , { $scope : scope } ) ;
402402 } ) ) ;
403403
404404
@@ -609,7 +609,7 @@ describe('tabs', function() {
609609 scope = $rootScope . $new ( ) ;
610610 scope . navType = 'pills' ;
611611
612- elm = $compile ( '<tabset type="navType"></tabset>' ) ( scope ) ;
612+ elm = $compile ( '<tabset type="{{ navType}} "></tabset>' ) ( scope ) ;
613613 scope . $apply ( ) ;
614614 } ) ) ;
615615
Original file line number Diff line number Diff line change 11
22< 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 >
44 < div class ="tab-content ">
55 < div class ="tab-pane "
66 ng-repeat ="tab in tabs "
You can’t perform that action at this time.
0 commit comments