There's a way to check if back button is shown?


I’m trying to show an icon on header with ion-nav-buttons, but just if back button is hidden with hide-back-button or whatever

What can I do?


You could adapt this to work for you.

$rootScope.$on('$viewHistory.historyChange', function(e, data) {
    if (data.showBack) {

Hide left header button when showing back button

I found the above code to not work in beta 14 and had to do the following instead (hope this helps out anyone else searching for an answer):

$rootScope.$on('$ionicView.beforeEnter', function (e, data) {        
        if (data.enableBack) {

[Solved] Detect if ion-nav-button is shown