I have a case where I want to stop the navigation based on a condition in the component. Please look at the code below
if(val instanceof NavigationStart){
if(on some condition) {
// Stop the navigation from here
}
}
I already have CanDeactivate which serves some other purpose of checking. In this case, I do it at the component level with the data I have currently.
Is there any way that I can use this NavigationStart to achieve my requirement.
Please help me. Thank you...