Skip to content

With InitialNavigation.enabledBlocking the initial navigation doesn't get completed #49567

Closed

Description

@trochol

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

Activity

  1. JeanMeche commented on Mar 23, 2023

    @JeanMeche
    Member

    Looks like this was a regression introduced by #48063

  2. added this to the needsTriage milestone on Mar 23, 2023
  3. added a commit that references this issue on Apr 1, 2023
    9b61379
  4. angular-automatic-lock-bot commented on May 2, 2023

    @angular-automatic-lock-bot

    This issue has been automatically locked due to inactivity.
    Please file a new issue if you are encountering a similar or related problem.

    Read more about our automatic conversation locking policy.

    This action has been performed automatically by a bot.

  5. locked and limited conversation to collaborators on May 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions