master
fefa4ka 10 years ago
parent d7809f4b36
commit bbdc103c87
  1. 35
      zsite/static/js/app.js

@ -31,30 +31,29 @@ angular.module('zuykov')
// GetAdj(6,'свежее', 'свежих') // Вернет «свежих» // GetAdj(6,'свежее', 'свежих') // Вернет «свежих»
}]) }])
.controller('TabsCtrl', ['$scope', function ($scope) { .controller('ngTabsCtrl', ['$scope', function ($scope) {
$scope.tabs = {
index: 0,
count: 0
};
this.headIndex = 0;
this.bodyIndex = 0;
this.getTabHeadIndex = function() {
return $scope.tabs.count = ++this.headIndex;
};
this.getTabBodyIndex = function() {
return ++this.bodyIndex;
};
}]) }])
.directive( 'ngTabs', function() { .directive( 'ngTabs', function() {
return { return {
scope: true, scope: true,
restrict: 'EAC', restrict: 'EAC',
controller: function( $scope ) { controller: 'ngTabsCtrl'
$scope.tabs = {
index: 0,
count: 0
};
this.headIndex = 0;
this.bodyIndex = 0;
this.getTabHeadIndex = function() {
return $scope.tabs.count = ++this.headIndex;
};
this.getTabBodyIndex = function() {
return ++this.bodyIndex;
};
}
}; };
}) })

Loading…
Cancel
Save