Skip to content

bug: routing with angular [queryParams] breaks subsequent relative navigations #24587

@adeprez

Description

@adeprez

Prerequisites

Ionic Framework Version

  • v4.x
  • v5.x
  • v6.x

Current Behavior

With Angular, when using ion-router-outlet as navigation root, relative navigation breaks if we use [routerLink] with a relative route combined with any [queryParams] value. After the first one, all other relative routes would not trigger navigation anymore.

Expected Behavior

The ion-router-outlet should behave like the angular's router-router : relative navigation is still possible once we navigated with query params.

Steps to Reproduce

I made a simple repro : https://stackblitz.com/edit/ionic-angular-v5-xjfgnp?file=src/app/dummy.component.ts
You can switch from Ionic to Angular router outlet using the top toggle button.

Once you click on the second link Stay on route 1 with query params with ion-router-outlet, relative navigation to other routes is broken and 3rd link will not trigger navigation anymore.

The same actions with Angular router-outlet would still work.

Code Reproduction URL

https://github.com/adeprez/ionic-angular-v6-relative-nav-issue

Ionic Info

No response

Additional Information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions