fix(headerBar): view header bars stay under nav bars

This commit is contained in:
Adam Bradley
2014-11-14 16:09:31 -06:00
parent 6cc8fdd77f
commit b3d1cc04de
4 changed files with 0 additions and 19 deletions

View File

@@ -374,11 +374,6 @@ function($scope, $element, $attrs, $compile, $timeout, $ionicNavBarDelegate, $io
}
$scope.$on('ionHeaderBar.init', function(ev) {
ev.stopPropagation();
});
$scope.$on('$destroy', function() {
$scope.$parent.$hasHeader = false;
$element.parent().removeData(DATA_NAV_BAR_CTRL);

View File

@@ -20,16 +20,9 @@ function($scope, $element, $attrs, $compile, $ionicHistory, $ionicViewSwitcher)
navBarDelegateHandle = delegateHandle;
});
var deregIonHeaderBarInit = $scope.$on('ionHeaderBar.init', function(ev){
// this view has its own ion-header-bar, remember it should trump other nav bars
ev.stopPropagation();
hasViewHeaderBar = true;
});
self.init = function() {
deregIonNavBarInit();
deregIonHeaderBarInit();
var modalCtrl = $element.inheritedData('$ionModalController');
navViewCtrl = $element.inheritedData('$ionNavViewController');

View File

@@ -140,7 +140,6 @@ function headerFooterBarDirective(isHeader) {
delete $scope.$hasSubheader;
});
ctrl.align();
$scope.$emit('ionHeaderBar.init');
} else {
$scope.$watch(function() { return $element[0].className; }, function(value) {

View File

@@ -112,12 +112,6 @@ describe('ionView directive', function() {
expect( beforeEnterData.navBarDelegate ).toBe('myViewNavBar');
}));
it('should be receive header bar init from child ionHeaderBar', inject(function($rootScope) {
var el = setup(null, null, '<ion-header-bar>');
$rootScope.$broadcast('$ionicView.beforeEnter', {});
expect( beforeEnterData.hasHeaderBar ).toBe(true);
}));
it('should only observe title attr after afterEnter and before beforeLeave', inject(function($rootScope) {
var el = setup('view-title="{{ myTitle }}"', {myTitle: 'My Title'});
$rootScope.$broadcast('$ionicView.beforeEnter', {});