Hey Ionic community,
I was wondering how a can display an popup message if user leave a view before clicking on the save button for example.
I thinking that code below could be works but not really…
$scope.$on('$ionicView.beforeLeave', function(e) {
if (condition) {
e.preventDefault(); // Prevent the user to leave the view
}
});
Thank you