Reputation:
I'm able to create a functioning back button by following the documentation http://ionicframework.com/docs/api/directive/ionNavBackButton/
<ion-nav-bar ng-controller="MyCtrl">
<ion-nav-back-button class="button-icon">
<i class="icon ion-arrow-left-c"></i>{{getPreviousTitle() || 'Back'}}
</ion-nav-back-button>
</ion-nav-bar>
function MyCtrl($scope, $ionicNavBarDelegate) {
$scope.getPreviousTitle = function() {
return $ionicNavBarDelegate.getPreviousTitle();
};
}
<ion-nav-back-button>
doesn't work for me for some reason.
I'd like to only show the back button in certain states. If I put a generic button inside ionic-nav-buttons it works. Putting a back button doesn't.
<ion-nav-buttons side="left">
</ion-nav-buttons>
Is there any way to put a back button inside ion-nav-buttons? I tried <ion-nav-back-button>
but it doesn't work either way.
Upvotes: 2
Views: 1243
Reputation:
I accomplished it by using the following:
<ion-view title="Dashboard" hide-back-button="true">
<ion-content">
</ion-content>
</ion-view>
I hope this helps.
Upvotes: 0