How can i know if <ion-nav-back-button> is displayed? (ionic 1)


#1

In a tab based ionic 1.x app, I’d like to display a customized “goBackHome” button only when the <ion-nav-back-button> is not displayed.

How to detect is the <ion-nav-back-button> is displayed or not?


#2

A working solution for the current Ionic 1.x release:

$rootScope.$on('$ionicView.beforeEnter', function(e, data) {
  $scope.isBackButtonShown = data.enableBack;
});