I'm having an issue. I'm building a Angular App, I'm using angular ui router.
I want to stop the navigation from one page to another until I'm running a dom animation
I know I have onStateSuccess and onStateStart but I don't know how to stop going to that state until I ran an animation.
I know I can navigate with $state.go('localhost')
but I am looking for a better approach to stop and resume the event.
Any ideas?
EDIT
I see that I can stop the event on change start, is there a way to resume it after I ran a few functions?
$rootScope.$on('$stateChangeStart', function(event, toState, toParams, fromState, fromParams){
console.log(event);
console.log(toState);
console.log(toParams);
console.log(fromState);
console.log(fromParams);
event.preventDefault();
// transitionTo() promise will be rejected with
// a 'transition prevented' error
});