Usefull if want to show alert before leaving the page
.state('activities', { url: '/activities', controller: 'AllActivitiesController', controllerAs: 'activities', templateUrl: '/app/templates/allActivities.html', onEnter: function(){ console.log("Entering into state"); }, onExit: function(){ console.log("Leaving the state"); } })
Last updated 4 years ago
Was this helpful?