Questions tagged [navigationstart]
2 questions
1
vote
2 answers
How to avoid navigating to another page while doing something in current page in Angular
Currently, I am on an HTML page and doing something. And if I mistakenly click another page then it will redirect to that page without getting any user confirmation.
This is my component.
export class MyComponent {
constructor(private router:…

Hans
- 308
- 7
- 20
0
votes
0 answers
Angular NavigationStart - Stop navigation conditionally
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…

Sai M.
- 2,548
- 4
- 29
- 46