-
Notifications
You must be signed in to change notification settings - Fork 26.5k
Closed
Labels
P2The issue is important to a large percentage of users, with a workaroundThe issue is important to a large percentage of users, with a workaroundarea: docsRelated to the documentationRelated to the documentation
Milestone
Description
Which @angular/* package(s) are the source of the bug?
router
Is this a regression?
No
Description
According to the Angular documentation, the router.getCurrentNavigation()
method should return null once navigation has completed. However, when subscribing to the Router events and listening for the NavigationEnd event, router.getCurrentNavigation()
still returns a non-null Navigation object.
Expected Behaviour:
router.getCurrentNavigation()
should return null when the NavigationEnd event is emitted.
Actual Behavior:
router.getCurrentNavigation()
continues to return a Navigation object even during the NavigationEnd event.

Please provide a link to a minimal reproduction of the bug
https://stackblitz.com/edit/angular-i278fkgd?file=src%2Fmain.ts
Please provide the exception or error you saw
Please provide the environment you discovered this bug in (run ng version
)
Angular CLI: 20.1.1
Node: 22.14.0
Package Manager: npm 11.4.2
OS: darwin x64
Angular: 20.1.2
... cdk, common, compiler, compiler-cli, core, forms, material
... platform-browser, router
Package Version
------------------------------------------------------
@angular-devkit/architect 0.2001.1
@angular-devkit/core 20.1.1
@angular-devkit/schematics 20.1.1
@angular/build 20.1.1
@angular/cli 20.1.1
@schematics/angular 20.1.1
rxjs 7.8.2
typescript 5.8.3
zone.js 0.15.1
Anything else?
No response
shubbush
Metadata
Metadata
Assignees
Labels
P2The issue is important to a large percentage of users, with a workaroundThe issue is important to a large percentage of users, with a workaroundarea: docsRelated to the documentationRelated to the documentation