Navigation ID 2 is not equal to the current navigation id 3
See original GitHub issueπ bug report
Affected Package
The issue is caused by package @angular/routerIs this a regression?
I never had this problem in previous version of angular.
Description
After auth login i have one button which will redirect me to dashboard but i am getting navigation is not matched. On component i have only one time router.navigate([β/dashboardβ]); With routerlink it is working routerLink=β/dashboardβ
π¬ Minimal Reproduction
Click on image to see properly.
Log:


https://stackblitz.com/...
π₯ Exception or Error
π Your Environment
Angular Version:
ng --version
_ _ ____ _ ___
/ \ _ __ __ _ _ _| | __ _ _ __ / ___| | |_ _|
/ β³ \ | '_ \ / _` | | | | |/ _` | '__| | | | | | |
/ ___ \| | | | (_| | |_| | | (_| | | | |___| |___ | |
/_/ \_\_| |_|\__, |\__,_|_|\__,_|_| \____|_____|___|
|___/
Angular CLI: 8.3.0
Node: 10.16.0
OS: win32 x64
Angular: 8.2.3
... common, compiler, compiler-cli, core, forms
... language-service, platform-browser, platform-browser-dynamic
... router
Package Version
-----------------------------------------------------------
@angular-devkit/architect 0.801.3
@angular-devkit/build-angular 0.801.3
@angular-devkit/build-optimizer 0.801.3
@angular-devkit/build-webpack 0.801.3
@angular-devkit/core 8.1.3
@angular-devkit/schematics 8.3.0
@angular/animations 8.2.5
@angular/cdk 8.1.4
@angular/cli 8.3.0
@angular/material 8.1.4
@ngtools/webpack 8.1.3
@schematics/angular 8.3.0
@schematics/update 0.803.0
rxjs 6.5.2
typescript 3.4.5
webpack 4.35.2
Anything else relevant?
Issue Analytics
- State:
- Created 4 years ago
- Reactions:2
- Comments:13 (2 by maintainers)
Top Results From Across the Web
angular - Navigation ID is not equal to the current router ...
Say the current navigation ID is 11. When I navigate to the problem route, the router starts navigation, successfully executes every navigation ......
Read more >Angular β Navigation ID is not equal to the current router ...
I'm using @ngrx/router-store in my Angularv5 app and I recently started running into a an error: Navigation ID X is not equal to...
Read more >When sophistication hurts functionality - i'm david
The error that we were getting when navigating was Navigation ID is not equal to the current router navigation id .
Read more >NavigationBehaviorOptions - Angular
After a navigation completes, the router writes an object containing this value together with a navigationId to history.state . The value is written...
Read more >[Solved]-Javascript code that show what is not equal-angular.js
[Solved]-Javascript code that show what is not equal-angular.js ... 2: NavigationCancel - Navigation ID 2 is not equal to the current navigation id...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

Duplicate of #34795 (the guard triggered a new navigation, which caused the NavigationCancel of the original and the new navigation goes to /auth/login, the URL of the start of the navigation)
βbecause your not supposed to do that in Angularβ => I think I have a legitimate use-case for wanting to navigate twice in the same βframe/tickβ. Possibly there are other solutions for solving what I want to do, if so, I have not found them.