How to pause the route change in navigationStart router event
How to pause the route change in navigationStart router event
In my application I have routes exposed from packages (node modules). So i couldn't use canActivate or canDeactivate for the routes defined inside node modules.
So I started subscribing to all route change in my app component and based on condition i am redirecting the user to different routes.
Since the condition has API call, the route change is not paused in the navigationStart instead it completes the routing to other page and once API call is successful the redirect happens to the other route.
How can i handle this? Is there anyway to pause the route change in navigationStart and enable the route after the API call or is there any other way to define canActivate for all routes including the routes from node modules.
By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.