Tab bar fixes

This commit is contained in:
Max Lynch
2013-11-19 17:58:14 -06:00
parent d9e2c11afc
commit 79f0c90564
4 changed files with 37 additions and 17 deletions

View File

@@ -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
});