Hide-back-button="true" is ignored since upgrading to v0.9.27

I just upgraded to v0.9.27 and the hide-back-button=“true” I had set on one of my pages seems to be ignored. The page is the ‘root’ of my page hierarchy inside one of my tabs. What is also strange is that the back button is showing, even though there is nothing to go to, which is not how it behaved before either. Is anybody else seeing this? Should I create a Codepen for it?

Could you post the code for your ion-nav-bar?

Here you go:

<ion-nav-bar animation="nav-title-slide-ios7" 
           type="bar-positive" 
           back-button-type="button-icon" 
           back-button-icon="ion-ios7-arrow-left"></ion-nav-bar>

I would recommend updating to 1.0 beta. The new system for navbars is much more stable.

The way you would do it now would be http://ionicframework.com/docs/api/directive/ionNavBar/:

<ion-nav-bar class="nav-title-slide-ios7 bar-positive">
  <ion-nav-back-button class="button-icon ion-ios7-arrow-left"></ion-nav-back-button>
</ion-nav-bar>

Then use ion-view like you would before. http://ionicframework.com/docs/api/directive/ionView/

<ion-view hide-back-button="true">

Alternatively, in 1.0 you can also now use $ionicNavBarDelegate to hide the back button if you need to. http://ionicframework.com/docs/api/service/$ionicNavBarDelegate/

function MyCtrl($scope, $ionicNavBarDelegate) {
  $ionicNavBarDelegate.showBar(false);
}
2 Likes

Thanks for the quick reply! I just upgraded to Beta1 and tried both techniques (hide-back-button) and setting showBar to false, but both of them don’t seem to do anything. Let me try to isolate the problem and put up codepen for it.