Now the problem is when I navigate to any other page or view from view 'X' then any events on hardware button on the new page still responds by executing someFunc that I had defined and used in ControllerX.
How should I remove that response for all my views except view X
I see similar behavior. I have an issue with closing a modal upon executing the back button. I placed a dummy do nothing function in my controller and registered it using
var deregister = $ionicPlatform.registerBackButtonAction(
function () {
console.log("close the popup")
}, 100
);
//Then when this scope is destroyed, remove the function
$scope.$on('$destroy', deregister)
Store your back button registration in a variable -> destroys the function if the view gets destroyed.