ionicNavBar showBackButton beta14

in accordance with the documentation:

Set/get whether the ionNavBackButton is shown (if it exists and there is a previous view that can be navigated to).
Returns: boolean Whether the back button is shown.

BUT with the last release Ionic Beta14 the method was modified and the GET NOT WORK.

in ionicBundle.js at row 47008 the method not work well.
If you not pass the parameter shouldShow to the method to GET the value of it, the method modify the variable isBackButtonShown before return it.

Sorry for my English :smiley:


  • @ngdoc method
  • @name $ionicNavBar#showBackButton
  • @description Show/hide the nav bar back button when there is a
  • back view. If the back button is not possible, for example, the
  • first view in the stack, then this will not force the back button
  • to show.
    self.showBackButton = function(shouldShow) {
    for (var x = 0; x < headerBars.length; x++) {
    $scope.$isBackButtonShown = !!shouldShow;
    return $scope.$isBackButtonShown;


can you put together a demo of this in a codepen or plunker?

If you uncomment in Js file Row 76 you can see that the get of this function reset the initial value of showBackButton. Or if you see the code of the method you can see the problem. :smiley:

Ahh I see, so calling $ionicNavBarDelegate.showBackButton() will set the value to false, even if you don’t pass in false.

Alright, can you open an issue for this on github?

Has this been addressed? Is there a github issue for $ionicNavBarDelegate.showBackButton() not working correctly?

Ah, I just found

Still having this trouble in RC4, unfortunately.