Ionic hide nav-bar not the buttons
You just have to specify what state want to hide the bar, and modify some styles
JS:
$rootScope.$on('$stateChangeStart', function(ev, toState, toParams, fromState, fromParams){
var states = ['tabs.about', 'tabs.contact'];
if(states.indexOf(toState.name) > -1) {
$rootScope.hideBar=true;
} else {
$rootScope.hideBar=false;
}
});
HTML:
<ion-nav-bar class="bar-positive" ng-class="{ 'make-border-trasparent': hideBar }">
<ion-nav-back-button>
</ion-nav-back-button>
</ion-nav-bar>
Please take a look at this example (I'm hiding the bar in the tabs.about
and tabs.contact
states)
Codepen
overwrite ion-nav-bar with ion-header-bar in one page
I got it finally. Just add nav bar buttons instead of ionic header bar.
Ion-tabs and hide-nav-bar leaves space, with top 0px also
Solved now, wanted to share this
This was because of the .has-tabs-top class that was being added to the ion-content element.
added this along with hide-nav-bar
in view and .tabs { top: 0 !important; }
.has-tabs-top {
top: 49px !important; /* height of the tabs */
}
Related Topics
How Debug Placeholder Pseudo Element in Firefox
Fixed Positioned Div Is Extending Outside of HTML & Body
How to Stop Manual Input in a Type=Number But Still Allow Changes with The "Up/Down" Buttons
Sidebar Position "Semi" Fixed CSS
Best Practice to Use Aria-Label as a Selector for Styling
How to Print a Web Page with All Its CSS Style Attached to The Page
Simple Two Column HTML Layout Without Using Tables
Distributing Images Evenly & Horizontally in a Div via CSS
CSS: Multiple Attribute Selectors
CSS Data Attribute Conditional Value Selector
Vs Code Live SASS Compiler Not Updating Files
HTML Div Width 100% Not Functioning
Strange Styling Through Injected Stylesheets in Chrome
CSS: Blue Border in Ie and Firefox Only