mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2026-03-13 10:22:08 +08:00
Removed named controller for tabs
This commit is contained in:
4
dist/css/ionic.css
vendored
4
dist/css/ionic.css
vendored
@@ -1,3 +1,4 @@
|
||||
@charset "UTF-8";
|
||||
/*!
|
||||
* Copyright 2013 Drifty Co.
|
||||
* http://drifty.com/
|
||||
@@ -3222,9 +3223,6 @@ a.subdued {
|
||||
right: 0; }
|
||||
|
||||
.menu-animated {
|
||||
-webkit-transition: transform 200ms ease;
|
||||
-moz-transition: transform 200ms ease;
|
||||
transition: transform 200ms ease;
|
||||
-webkit-transition: -webkit-transform 200ms ease;
|
||||
-moz-transition: -moz-transform 200ms ease;
|
||||
transition: transform 200ms ease; }
|
||||
|
||||
1
dist/css/themes/ionic-ios7.css
vendored
1
dist/css/themes/ionic-ios7.css
vendored
@@ -1,3 +1,4 @@
|
||||
@charset "UTF-8";
|
||||
/*!
|
||||
* Copyright 2013 Drifty Co.
|
||||
* http://drifty.com/
|
||||
|
||||
72
dist/js/ionic-angular.js
vendored
72
dist/js/ionic-angular.js
vendored
@@ -2066,49 +2066,47 @@ angular.module('ionic.ui.tabs', ['ngAnimate'])
|
||||
* on a tab bar. Modelled off of UITabBarController.
|
||||
*/
|
||||
|
||||
.controller('TabsCtrl', ['$scope', '$element', '$animate', function($scope, $element, $animate) {
|
||||
var _this = this;
|
||||
|
||||
angular.extend(this, ionic.controllers.TabBarController.prototype);
|
||||
|
||||
ionic.controllers.TabBarController.call(this, {
|
||||
controllerChanged: function(oldC, oldI, newC, newI) {
|
||||
$scope.controllerChanged && $scope.controllerChanged({
|
||||
oldController: oldC,
|
||||
oldIndex: oldI,
|
||||
newController: newC,
|
||||
newIndex: newI
|
||||
});
|
||||
},
|
||||
tabBar: {
|
||||
tryTabSelect: function() {},
|
||||
setSelectedItem: function(index) {},
|
||||
addItem: function(item) {}
|
||||
}
|
||||
});
|
||||
|
||||
this.add = function(controller) {
|
||||
this.addController(controller);
|
||||
this.select(0);
|
||||
};
|
||||
|
||||
this.select = function(controllerIndex) {
|
||||
$scope.activeAnimation = $scope.animation;
|
||||
_this.selectController(controllerIndex);
|
||||
};
|
||||
|
||||
$scope.controllers = this.controllers;
|
||||
|
||||
$scope.tabsController = this;
|
||||
}])
|
||||
|
||||
.directive('tabs', function() {
|
||||
return {
|
||||
restrict: 'E',
|
||||
replace: true,
|
||||
scope: true,
|
||||
transclude: true,
|
||||
controller: 'TabsCtrl',
|
||||
controller: ['$scope', '$element', '$animate', function($scope, $element, $animate) {
|
||||
var _this = this;
|
||||
|
||||
angular.extend(this, ionic.controllers.TabBarController.prototype);
|
||||
|
||||
ionic.controllers.TabBarController.call(this, {
|
||||
controllerChanged: function(oldC, oldI, newC, newI) {
|
||||
$scope.controllerChanged && $scope.controllerChanged({
|
||||
oldController: oldC,
|
||||
oldIndex: oldI,
|
||||
newController: newC,
|
||||
newIndex: newI
|
||||
});
|
||||
},
|
||||
tabBar: {
|
||||
tryTabSelect: function() {},
|
||||
setSelectedItem: function(index) {},
|
||||
addItem: function(item) {}
|
||||
}
|
||||
});
|
||||
|
||||
this.add = function(controller) {
|
||||
this.addController(controller);
|
||||
this.select(0);
|
||||
};
|
||||
|
||||
this.select = function(controllerIndex) {
|
||||
$scope.activeAnimation = $scope.animation;
|
||||
_this.selectController(controllerIndex);
|
||||
};
|
||||
|
||||
$scope.controllers = this.controllers;
|
||||
|
||||
$scope.tabsController = this;
|
||||
}],
|
||||
//templateUrl: 'ext/angular/tmpl/ionicTabBar.tmpl.html',
|
||||
template: '<div class="content"><tab-controller-bar></tab-controller-bar></div>',
|
||||
compile: function(element, attr, transclude, tabsCtrl) {
|
||||
|
||||
72
js/ext/angular/src/directive/ionicTabBar.js
vendored
72
js/ext/angular/src/directive/ionicTabBar.js
vendored
@@ -7,49 +7,47 @@ angular.module('ionic.ui.tabs', ['ngAnimate'])
|
||||
* on a tab bar. Modelled off of UITabBarController.
|
||||
*/
|
||||
|
||||
.controller('TabsCtrl', ['$scope', '$element', '$animate', function($scope, $element, $animate) {
|
||||
var _this = this;
|
||||
|
||||
angular.extend(this, ionic.controllers.TabBarController.prototype);
|
||||
|
||||
ionic.controllers.TabBarController.call(this, {
|
||||
controllerChanged: function(oldC, oldI, newC, newI) {
|
||||
$scope.controllerChanged && $scope.controllerChanged({
|
||||
oldController: oldC,
|
||||
oldIndex: oldI,
|
||||
newController: newC,
|
||||
newIndex: newI
|
||||
});
|
||||
},
|
||||
tabBar: {
|
||||
tryTabSelect: function() {},
|
||||
setSelectedItem: function(index) {},
|
||||
addItem: function(item) {}
|
||||
}
|
||||
});
|
||||
|
||||
this.add = function(controller) {
|
||||
this.addController(controller);
|
||||
this.select(0);
|
||||
};
|
||||
|
||||
this.select = function(controllerIndex) {
|
||||
$scope.activeAnimation = $scope.animation;
|
||||
_this.selectController(controllerIndex);
|
||||
};
|
||||
|
||||
$scope.controllers = this.controllers;
|
||||
|
||||
$scope.tabsController = this;
|
||||
}])
|
||||
|
||||
.directive('tabs', function() {
|
||||
return {
|
||||
restrict: 'E',
|
||||
replace: true,
|
||||
scope: true,
|
||||
transclude: true,
|
||||
controller: 'TabsCtrl',
|
||||
controller: ['$scope', '$element', '$animate', function($scope, $element, $animate) {
|
||||
var _this = this;
|
||||
|
||||
angular.extend(this, ionic.controllers.TabBarController.prototype);
|
||||
|
||||
ionic.controllers.TabBarController.call(this, {
|
||||
controllerChanged: function(oldC, oldI, newC, newI) {
|
||||
$scope.controllerChanged && $scope.controllerChanged({
|
||||
oldController: oldC,
|
||||
oldIndex: oldI,
|
||||
newController: newC,
|
||||
newIndex: newI
|
||||
});
|
||||
},
|
||||
tabBar: {
|
||||
tryTabSelect: function() {},
|
||||
setSelectedItem: function(index) {},
|
||||
addItem: function(item) {}
|
||||
}
|
||||
});
|
||||
|
||||
this.add = function(controller) {
|
||||
this.addController(controller);
|
||||
this.select(0);
|
||||
};
|
||||
|
||||
this.select = function(controllerIndex) {
|
||||
$scope.activeAnimation = $scope.animation;
|
||||
_this.selectController(controllerIndex);
|
||||
};
|
||||
|
||||
$scope.controllers = this.controllers;
|
||||
|
||||
$scope.tabsController = this;
|
||||
}],
|
||||
//templateUrl: 'ext/angular/tmpl/ionicTabBar.tmpl.html',
|
||||
template: '<div class="content"><tab-controller-bar></tab-controller-bar></div>',
|
||||
compile: function(element, attr, transclude, tabsCtrl) {
|
||||
|
||||
Reference in New Issue
Block a user