1
0
Fork 0
mirror of https://github.com/openstf/stf synced 2025-10-06 03:50:04 +02:00

Removed isolated scope. Now we can use a parent scope inside the tabs.

This commit is contained in:
Gunther Brunner 2014-04-08 19:41:29 +09:00
parent c91fb302a0
commit b4e30aae75

View file

@ -2,24 +2,17 @@ module.exports = function niceTabsDirective() {
return {
restrict: 'EA',
replace: true,
scope: {
tabs: '=',
filter: '='
},
template: require('./nice-tabs.jade'),
link: function (scope, element, attrs) {
// TODO: add support for 'key' for saving in localstorage
// TODO: add support for 'direction=below' for below tabs
scope.$watch('tabs', function (newValue, oldValue) {
if (newValue !== oldValue) {
scope.tabs = newValue
}
scope.$watch(attrs.tabs, function (newValue, oldValue) {
scope.tabs = newValue
})
scope.$watch('filter', function (newValue, oldValue) {
if (newValue !== oldValue) {
scope.filter = newValue
}
scope.$watch(attrs.filter, function (newValue, oldValue) {
scope.filter = newValue
})
scope.tabFound = function (tab) {