How can I add a listener for a navigation event so that I can save changes before I leave a page?
This is for ionic.
How can I add a listener for a navigation event so that I can save changes before I leave a page?
This is for ionic.
Hello Jackson,
Please use the event "Before page leaving" for that
I didn't see where that event was an option in ionic 1, but this worked as well:
$scope.$on('$destroy',function(){
// do something
});
Thanks for looking into it.
Glad to hear things are sorted out now!