in accordance with the documentation:
showBackButton([show])
Set/get whether the ionNavBackButton is shown (if it exists and there is a previous view that can be navigated to).
Param
show(optional)
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
/**
- @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++) {
headerBars[x].controller().showNavBack(!!shouldShow);
}
$scope.$isBackButtonShown = !!shouldShow;
return $scope.$isBackButtonShown;
};