Hi, can anyone please explain me how to use these two services
$ionicPlatform.on("backbutton") & $ionicPlatform.onHardwareBackButton
I have implemented this code
var deregister = $ionicPlatform.registerBackButtonAction(function () {
alert("Show on the home page")
}, 100
);
$scope.$on('$destroy', deregister)
in controller A. The problem is now the alert is shown in all views. I want to show a ionic popup when user presses back button when he is on main page.
Any help ?