I need to show and hide back button in different pages/views. I took reference from Justin Noel:
You can change the cache settings so that when the page is reloaded the controller is called again: http://ionicframework.com/docs/api/directive/ionNavView/
The hide-back-button
attribute on <ion-view>
did the trick for me: <ion-view hide-back-button="true">
See the official documentation here.
$ionicHistory.nextViewOptions({
disableBack: true
});
$state.go('app.home');