I have three views playlists, playlist, and mediaplayer.
In my project I am getting back button by default. I am debugging an play store app my direction viewing the page is playlists-->playlist-->media player.Also i have separate controller for all there views but i am getting a default back button in playlist and mediaplayer page only.
1).On clicking the back button in playlist page goes to playlists page so there is no problem.
2).On clicking the back button in mediaplayer page goes to playlists page but i need to go to playlist.
here i have some links that i have gone through but i am not able to understand about
Soft navigation bar button - override $rootScope.$ionicGoBack()
Hard Android button - use $ionicPlatform.registerBackButtonAction()
1).Ionic override all BACK button behaviour for specific controller
2).https://github.com/driftyco/ionic/issues/399
3).https://forum.ionicframework.com/t/how-to-handle-a-click-on-the-generated-back-button/582
Please some explain me about overriding the $ionicGoBack(). In my case how to find weather it is Soft navigation bar button or Hard Android button.
When i give inspect element on back button on the page mediaplayer i got this
<button ng-click="$ionicGoBack()" class="button back-button buttons button-clear header-item" tabindex="0">
<i class="icon ion-ios-arrow-back"></i>
<span class="back-text" style="transform: translate3d(0px, 0px, 0px);">
<span class="default-title">Back</span>
<span class="previous-title hide">Home</span>
</span></button>