mirror of
https://github.com/DeviceFarmer/stf.git
synced 2026-04-18 16:13:24 +02:00
Removed isolated scope. Now we can use a parent scope inside the tabs.
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user