I’m not sure I understand the difference between the header and nav bar. (ie. has-header=true and/or hide-nav-bar=false)
The “nav-bar” in my app index.html just wasn’t providing the ability to customize and add a logo/buttons etc. So I just made a div and styled it. But of course it’s missing the support of hiding/showing per view using hide-nav-bar.
The <ion-nav-bar> and <ion-view> go hand in hand. The ion-nav-bar is for the general app container, the ion-view is for each individual state. The view is nested below the nav-bar.
I’m not sure I follow; if ion-nav-bar is the “main app nav bar”, and ion-view is the “sub nav bar for each page”, why when i delete ion-nav-bar, does the “sub nav bar” also delete.
Maybe I should try explaining my problem a bit better.
I have 2 core pages that I want no nav bar (this is easy enough by saying hide-nav-bar="true" when using the ion-nav-bar default).
Then I have a landing (list) page which I would like to have the core nav bar (styled with logo in the center and “home” button on the right hand side), no back button. (currently default behaviour injects a back button that I don’t want)
Then on the detail page I’d like to have the same nav, now including a back button.
So I guess the core of my problem lies with the inability to style ion-nav-bar the way I want it. I can do this in html/css just fine (as noted in my original post) but it doesn’t have nav-bar functionality to be able to show/hide using hide-nav-bar (because well, it’s not a nav bar, just an html element that looks like one)
I thought it would be as simple as wrapping my code with the nav-bar directive to style it/use it.
i also was dealing with the differences between and
at the end i settled with everywhere (i rewrite it in every view, with all the icons and titles i want…
AFAIK has just the advantages to manage natively the navigation history…
but hasn’t all the customization features of .
so i’m managing the “back buttons” with $window.history.back();
(see my in-dev app https://github.com/krur/Silo_app )
So in a view, we can hide or show the left and right buttons as well as the back button.
But what about other stuff like colours? Are are we able to customise the background colour within ion-view?
This is really helpful, however I was wondering where this info is in the docs?
I’ve looked high and low and am worried I’m missing out on some important APIs that aren’t documented. In order to use $scope.rightButtons do I need to include right button somehow in the ion-nav-bar markup?
left-buttons and right-buttons are still on the navBarController in the Ionic source. However, I think it’d be wise to avoid them. This was a VERY old method of assigning buttons in Ionic. I think the code is still there simply for the framework to do stuff with.