How to detect navigation event
Posted: Thu Oct 15, 2020 9:39 pm
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.
Catch up wih the Appery.io community on our forum. Here you'll find information on the lastest questions and issues Appery.io developers are discussing.
https://forum.appery.io/
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!