Hello,
I want to hide my menu icon when the back button is shown.
<ion-side-menu-content>
<ion-nav-bar class="bar-positive">
<ion-nav-back-button class="button-icon button-clear ion-ios7-arrow-thin-left"></ion-nav-back-button>
</ion-nav-bar>
<ion-nav-buttons side="left" ng-if="!isBackButtonShown ">
<button class="button button-icon ion-navicon" ng-click="toggleMenu()"></button>
</ion-nav-buttons>
<ion-nav-view name="menu-content"></ion-nav-view>
</ion-side-menu-content>
What can I do in scope.backButtonHidden to detect if the back button is shown or not ? ^^
EDIT :
$ionicNavBarDelegate.showBackButton() returns if the back button is shown or not but how can I update my scope.isBackButtonShown each time the view change ? It would be great to emit an event when the back button is shown or not or to have access directly to its state so we can use the two way data binding.
EDIT 2 :
Here is the solution from here :
$rootScope.$on('$viewHistory.historyChange', function(e, data) {
$scope.isBackButtonShown = !!data.showBack;
});