Hide back button by default
The back button should be hidden by default so it doesn't flicker on initial page loads.
i'm noticing this issue as well
Fixed.
I updated Ionic and now my back buttons are hidden (class="hide"), which I am guessing is because of this "Hide back button by default". So, how do I show it now?
What's the markup for your ionNavBar?
<ion-nav-bar type="bar-light"
back-button-type="button-icon button-clear"
back-button-icon="ion-ios7-arrow-back"
align-title="right"></ion-nav-bar>
That looks right. What kind of navigation are you doing where you expect back buttons and they aren't showing up?
I'm not sure I understand your question, but I arrive at the page I have the nav-bar in through a link. Specifically, a link on "#/cardholder" with href="#/slide-box/card/{{card.id}}" where slide-box is an abstract state with a header (where the back button should be to take you back to "#/cardholder") and a slide-box in the content.
It's gettting a little clearer, Would you mind sharing your state definitions?
.state('cardholder', {
url: '/cardholder?tag',
templateUrl: 'templates/cardholder.html',
controller: 'CardholderCtrl'
})
.state('slide-box', {
url: '/slide-box',
abstract: true,
templateUrl: 'templates/slide-box.html',
controller: 'SlideBoxCtrl'
})
.state('slide-box.card', {
url: '/card/:cardId',
templateUrl: 'templates/card.html',
controller: 'CardCtrl'
});
OK. I think there's no back button from the nav-view because you are changing from one parent state to another ('cardholder' parent to 'slide-box' parent). The back button works when you're under the same parent state. Think of it like the nav-bar thinks you 'switched tabs' - or switched to a new navigation stack - because your state changed.
You have a couple choices:
- Put the cardholder under the slide-box state
- Make your own back button on this page (using left-buttons)
OK, I went for option 3 and it is working, thanks!
Thanks for the issue! This issue is being locked to prevent comments that are not relevant to the original issue. If this is still an issue with the latest version of Ionic, please create a new issue and ensure the template is fully filled out.