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:
parent
c91fb302a0
commit
b4e30aae75
1 changed files with 5 additions and 12 deletions
|
@ -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) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue