Skip to content
This repository was archived by the owner on May 29, 2019. It is now read-only.

Update tabs.js #1335

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 12 additions & 10 deletions src/tabs/tabs.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

/**
* @ngdoc overview
* @name ui.bootstrap.tabs
Expand Down Expand Up @@ -300,15 +299,18 @@ angular.module('ui.bootstrap.tabs', [])
require: '^tabset',
templateUrl: 'template/tabs/tabset-titles.html',
replace: true,
link: function(scope, elm, attrs, tabsetCtrl) {
if (!scope.$eval(attrs.tabsetTitles)) {
elm.remove();
} else {
//now that tabs location has been decided, transclude the tab titles in
tabsetCtrl.$transcludeFn(tabsetCtrl.$scope.$parent, function(node) {
elm.append(node);
});
}
link: function (scope, elm, attrs, tabsetCtrl) {
//tabsetCtrl.$scope could be null
attrs.$observe(tabsetCtrl.$scope, function () {
if (!scope.$eval(attrs.tabsetTitles)) {
elm.remove();
} else {
//now that tabs location has been decided, transclude the tab titles in
tabsetCtrl.$transcludeFn(tabsetCtrl.$scope.$parent, function (node) {
elm.append(node);
});
}
});
}
};
});