mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-11-07 06:57:02 +08:00
Changed tabs not use isolated scope
This commit is contained in:
14
dist/js/ionic-angular.js
vendored
14
dist/js/ionic-angular.js
vendored
@ -24573,24 +24573,26 @@ angular.module('ionic.ui.tabs', ['ngAnimate'])
|
|||||||
};
|
};
|
||||||
|
|
||||||
$scope.controllers = this.controllers;
|
$scope.controllers = this.controllers;
|
||||||
|
|
||||||
|
$scope.tabsController = this;
|
||||||
}])
|
}])
|
||||||
|
|
||||||
.directive('tabs', function() {
|
.directive('tabs', function() {
|
||||||
return {
|
return {
|
||||||
restrict: 'E',
|
restrict: 'E',
|
||||||
replace: true,
|
replace: true,
|
||||||
scope: {
|
scope: true,
|
||||||
animation: '@',
|
|
||||||
controllerChanged: '&',
|
|
||||||
tabsType: '@',
|
|
||||||
tabsStyle: '@',
|
|
||||||
},
|
|
||||||
transclude: true,
|
transclude: true,
|
||||||
controller: 'TabsCtrl',
|
controller: 'TabsCtrl',
|
||||||
//templateUrl: 'ext/angular/tmpl/ionicTabBar.tmpl.html',
|
//templateUrl: 'ext/angular/tmpl/ionicTabBar.tmpl.html',
|
||||||
template: '<div class="content"><tab-controller-bar></tab-controller-bar></div>',
|
template: '<div class="content"><tab-controller-bar></tab-controller-bar></div>',
|
||||||
compile: function(element, attr, transclude, tabsCtrl) {
|
compile: function(element, attr, transclude, tabsCtrl) {
|
||||||
return function($scope, $element, $attr) {
|
return function($scope, $element, $attr) {
|
||||||
|
|
||||||
|
$scope.tabsType = $attr.tabsType || 'tabs-positive';
|
||||||
|
$scope.tabsStyle = $attr.tabsStyle;
|
||||||
|
$scope.animation = $attr.animation;
|
||||||
|
|
||||||
$scope.$watch('activeAnimation', function(value) {
|
$scope.$watch('activeAnimation', function(value) {
|
||||||
//$element.removeClass($scope.animation + ' ' + $scope.animation + '-reverse');
|
//$element.removeClass($scope.animation + ' ' + $scope.animation + '-reverse');
|
||||||
$element.addClass($scope.activeAnimation);
|
$element.addClass($scope.activeAnimation);
|
||||||
|
|||||||
14
js/ext/angular/src/directive/ionicTabBar.js
vendored
14
js/ext/angular/src/directive/ionicTabBar.js
vendored
@ -39,24 +39,26 @@ angular.module('ionic.ui.tabs', ['ngAnimate'])
|
|||||||
};
|
};
|
||||||
|
|
||||||
$scope.controllers = this.controllers;
|
$scope.controllers = this.controllers;
|
||||||
|
|
||||||
|
$scope.tabsController = this;
|
||||||
}])
|
}])
|
||||||
|
|
||||||
.directive('tabs', function() {
|
.directive('tabs', function() {
|
||||||
return {
|
return {
|
||||||
restrict: 'E',
|
restrict: 'E',
|
||||||
replace: true,
|
replace: true,
|
||||||
scope: {
|
scope: true,
|
||||||
animation: '@',
|
|
||||||
controllerChanged: '&',
|
|
||||||
tabsType: '@',
|
|
||||||
tabsStyle: '@',
|
|
||||||
},
|
|
||||||
transclude: true,
|
transclude: true,
|
||||||
controller: 'TabsCtrl',
|
controller: 'TabsCtrl',
|
||||||
//templateUrl: 'ext/angular/tmpl/ionicTabBar.tmpl.html',
|
//templateUrl: 'ext/angular/tmpl/ionicTabBar.tmpl.html',
|
||||||
template: '<div class="content"><tab-controller-bar></tab-controller-bar></div>',
|
template: '<div class="content"><tab-controller-bar></tab-controller-bar></div>',
|
||||||
compile: function(element, attr, transclude, tabsCtrl) {
|
compile: function(element, attr, transclude, tabsCtrl) {
|
||||||
return function($scope, $element, $attr) {
|
return function($scope, $element, $attr) {
|
||||||
|
|
||||||
|
$scope.tabsType = $attr.tabsType || 'tabs-positive';
|
||||||
|
$scope.tabsStyle = $attr.tabsStyle;
|
||||||
|
$scope.animation = $attr.animation;
|
||||||
|
|
||||||
$scope.$watch('activeAnimation', function(value) {
|
$scope.$watch('activeAnimation', function(value) {
|
||||||
//$element.removeClass($scope.animation + ' ' + $scope.animation + '-reverse');
|
//$element.removeClass($scope.animation + ' ' + $scope.animation + '-reverse');
|
||||||
$element.addClass($scope.activeAnimation);
|
$element.addClass($scope.activeAnimation);
|
||||||
|
|||||||
Reference in New Issue
Block a user