diff --git a/js/angular/controller/navBarController.js b/js/angular/controller/navBarController.js index 9863be8f700..b7af555fef4 100644 --- a/js/angular/controller/navBarController.js +++ b/js/angular/controller/navBarController.js @@ -414,6 +414,9 @@ function($scope, $element, $attrs, $compile, $timeout, $ionicNavBarDelegate, $io $element[isTabsTop ? 'addClass' : 'removeClass']('nav-bar-tabs-top'); }; + self.hasBarSubheader = function(isBarSubheader) { + $element[isBarSubheader ? 'addClass' : 'removeClass']('nav-bar-has-subheader'); + }; // DEPRECATED, as of v1.0.0-beta14 ------- self.changeTitle = function(val) { diff --git a/js/angular/controller/navViewController.js b/js/angular/controller/navViewController.js index 4572bb8cc47..76f86ba6508 100644 --- a/js/angular/controller/navViewController.js +++ b/js/angular/controller/navViewController.js @@ -56,6 +56,7 @@ function($scope, $element, $attrs, $compile, $controller, $ionicNavBarDelegate, $scope.$on('$ionicHistory.deselect', self.cacheCleanup); $scope.$on('$ionicTabs.top', onTabsTop); + $scope.$on('$ionicSubheader', onBarSubheader); ionic.Platform.ready(function() { if (ionic.Platform.isWebView() && $ionicConfig.views.swipeBackEnabled()) { @@ -432,6 +433,10 @@ function($scope, $element, $attrs, $compile, $controller, $ionicNavBarDelegate, associatedNavBarCtrl && associatedNavBarCtrl.hasTabsTop(isTabsTop); } + function onBarSubheader(ev, isBarSubheader) { + var associatedNavBarCtrl = getAssociatedNavBarCtrl(); + associatedNavBarCtrl && associatedNavBarCtrl.hasBarSubheader(isBarSubheader); + } function getAssociatedNavBarCtrl() { if (navBarDelegate) { diff --git a/js/angular/directive/headerFooterBar.js b/js/angular/directive/headerFooterBar.js index 942aa29fbc9..07ede0805ce 100644 --- a/js/angular/directive/headerFooterBar.js +++ b/js/angular/directive/headerFooterBar.js @@ -137,6 +137,7 @@ function headerFooterBarDirective(isHeader) { var isSubheader = value.indexOf('bar-subheader') !== -1; $scope.$hasHeader = isShown && !isSubheader; $scope.$hasSubheader = isShown && isSubheader; + $scope.$emit('$ionicSubheader', $scope.$hasSubheader); }); $scope.$on('$destroy', function() { delete $scope.$hasHeader; diff --git a/scss/_bar.scss b/scss/_bar.scss index 510c02e2e69..0e0719e658a 100644 --- a/scss/_bar.scss +++ b/scss/_bar.scss @@ -264,6 +264,10 @@ .platform-android { + .nav-bar-has-subheader .bar { + border-bottom: 0; + } + .bar { .back-button .icon:before {