-
Notifications
You must be signed in to change notification settings - Fork 27.1k
Closed
Closed
Copy link
Milestone
Description
Which @angular/* package(s) are the source of the bug?
router
Is this a regression?
No
Description
If I use InitialNavigation.enabledBlocking in my router config the initial navigation doesn't get completed.
The reason for this is the missing call of complete() here:
if (!bootstrapDone.closed) {
bootstrapDone.next();
bootstrapDone.unsubscribe();
}
https://github.com/angular/angular/blob/main/packages/router/src/provide_router.ts#L214
Please provide a link to a minimal reproduction of the bug
https://github.com/trochol/enabled-blocking
Please provide the exception or error you saw
In the reproduction of this bug the currentNavigation is returned in ngOnInit of the page-one component.
If the router config is changed to InitialNavigation.enabledNonBlocking the request of the currentNavigation returns null.
Please provide the environment you discovered this bug in (run ng version)
Angular CLI: 15.1.6
Node: 16.14.2
Package Manager: npm 8.18.0
OS: win32 x64
Angular: 15.2.4
... animations, common, compiler, compiler-cli, core, forms
... platform-browser, platform-browser-dynamic, router
Package Version
---------------------------------------------------------
@angular-devkit/architect 0.1502.4
@angular-devkit/build-angular 15.2.4
@angular-devkit/core 15.2.4
@angular-devkit/schematics 15.1.6
@angular/cli 15.1.6
@schematics/angular 15.1.6
rxjs 7.8.0
typescript 4.9.5
Anything else?
No response
Reactions are currently unavailable