mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-11-08 23:58:13 +08:00
Tab bar fixes
This commit is contained in:
26
dist/js/ionic-angular.js
vendored
26
dist/js/ionic-angular.js
vendored
@ -25494,12 +25494,9 @@ angular.module('ionic.ui.navRouter', [])
|
||||
$scope.currentTitle = data.title;
|
||||
}
|
||||
|
||||
if(typeof data.leftButtons !== 'undefined') {
|
||||
$scope.leftButtons = data.leftButtons;
|
||||
}
|
||||
if(typeof data.rightButtons !== 'undefined') {
|
||||
$scope.rightButtons = data.rightButtons;
|
||||
}
|
||||
$scope.leftButtons = data.leftButtons;
|
||||
$scope.rightButtons = data.rightButtons;
|
||||
|
||||
if(typeof data.hideBackButton !== 'undefined') {
|
||||
$scope.enableBackButton = data.hideBackButton !== true;
|
||||
}
|
||||
@ -25522,6 +25519,19 @@ angular.module('ionic.ui.navRouter', [])
|
||||
updateHeaderData(data);
|
||||
});
|
||||
|
||||
$scope.$parent.$on('navRouter.titleChanged', function(e, data) {
|
||||
var oldTitle = $scope.currentTitle;
|
||||
$scope.oldTitle = oldTitle;
|
||||
|
||||
if(data.animate !== false && typeof data.title !== 'undefined') {
|
||||
animate($scope, $element, oldTitle, data, function() {
|
||||
hb.align();
|
||||
});
|
||||
} else {
|
||||
hb.align();
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
/*
|
||||
$scope.$parent.$on('navigation.push', function() {
|
||||
@ -25582,7 +25592,7 @@ angular.module('ionic.ui.navRouter', [])
|
||||
var titleGet = $parse($attr.title);
|
||||
$scope.$watch(titleGet, function(value) {
|
||||
$scope.title = value;
|
||||
$scope.$emit('navRouter.pageChanged', {
|
||||
$scope.$emit('navRouter.titleChanged', {
|
||||
title: value,
|
||||
animate: $scope.animate
|
||||
});
|
||||
@ -26027,7 +26037,7 @@ angular.module('ionic.ui.tabs', ['ngAnimate'])
|
||||
$scope.hideBackButton = $scope.$eval($attr.hideBackButton);
|
||||
|
||||
if($scope.hideBackButton !== true) {
|
||||
$scope.hideBackButton = true;
|
||||
$scope.hideBackButton = false;
|
||||
}
|
||||
|
||||
// Whether we should animate on tab change, also impacts whether we
|
||||
|
||||
24
js/ext/angular/src/directive/ionicNavRouter.js
vendored
24
js/ext/angular/src/directive/ionicNavRouter.js
vendored
@ -231,12 +231,9 @@ angular.module('ionic.ui.navRouter', [])
|
||||
$scope.currentTitle = data.title;
|
||||
}
|
||||
|
||||
if(typeof data.leftButtons !== 'undefined') {
|
||||
$scope.leftButtons = data.leftButtons;
|
||||
}
|
||||
if(typeof data.rightButtons !== 'undefined') {
|
||||
$scope.rightButtons = data.rightButtons;
|
||||
}
|
||||
$scope.leftButtons = data.leftButtons;
|
||||
$scope.rightButtons = data.rightButtons;
|
||||
|
||||
if(typeof data.hideBackButton !== 'undefined') {
|
||||
$scope.enableBackButton = data.hideBackButton !== true;
|
||||
}
|
||||
@ -259,6 +256,19 @@ angular.module('ionic.ui.navRouter', [])
|
||||
updateHeaderData(data);
|
||||
});
|
||||
|
||||
$scope.$parent.$on('navRouter.titleChanged', function(e, data) {
|
||||
var oldTitle = $scope.currentTitle;
|
||||
$scope.oldTitle = oldTitle;
|
||||
|
||||
if(data.animate !== false && typeof data.title !== 'undefined') {
|
||||
animate($scope, $element, oldTitle, data, function() {
|
||||
hb.align();
|
||||
});
|
||||
} else {
|
||||
hb.align();
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
/*
|
||||
$scope.$parent.$on('navigation.push', function() {
|
||||
@ -319,7 +329,7 @@ angular.module('ionic.ui.navRouter', [])
|
||||
var titleGet = $parse($attr.title);
|
||||
$scope.$watch(titleGet, function(value) {
|
||||
$scope.title = value;
|
||||
$scope.$emit('navRouter.pageChanged', {
|
||||
$scope.$emit('navRouter.titleChanged', {
|
||||
title: value,
|
||||
animate: $scope.animate
|
||||
});
|
||||
|
||||
2
js/ext/angular/src/directive/ionicTabBar.js
vendored
2
js/ext/angular/src/directive/ionicTabBar.js
vendored
@ -110,7 +110,7 @@ angular.module('ionic.ui.tabs', ['ngAnimate'])
|
||||
$scope.hideBackButton = $scope.$eval($attr.hideBackButton);
|
||||
|
||||
if($scope.hideBackButton !== true) {
|
||||
$scope.hideBackButton = true;
|
||||
$scope.hideBackButton = false;
|
||||
}
|
||||
|
||||
// Whether we should animate on tab change, also impacts whether we
|
||||
|
||||
@ -17,7 +17,7 @@
|
||||
</pane>
|
||||
|
||||
<script id="page1.html" type="text/ng-template">
|
||||
<nav-page hide-back-button="true">
|
||||
<nav-page>
|
||||
|
||||
<tabs tabs-style="tabs-icon-top" tabs-type="tabs-positive" animate-nav="false">
|
||||
|
||||
|
||||
Reference in New Issue
Block a user