You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
bug: routing with angular [queryParams] breaks subsequent relative navigations #24587
I have searched for existing issues that already report this problem, without success.
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.
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.
I see that when using ion-router-outlet and routing to a route with query parameters, the other router link href is being updated to /. This behavior is inconsistent with router-outlet, where the router link is untouched when navigating to a route with query params.
We will log this issue as a bug and prioritize, thanks!
I have experienced this issue today and have resorted to remove query params and solve the route params using a different method (storage). Seems to work fine in web but not on tablets and phones, at least in the emulated ones. I have updated to 6.0.7 and still had the issue.
Activity
sean-perkins commentedon Jan 18, 2022
@adeprez thanks for reporting this issue!
I see that when using
ion-router-outletand routing to a route with query parameters, the other router linkhrefis being updated to/. This behavior is inconsistent withrouter-outlet, where the router link is untouched when navigating to a route with query params.We will log this issue as a bug and prioritize, thanks!
EssyTech commentedon Feb 15, 2022
I have experienced this issue today and have resorted to remove query params and solve the route params using a different method (storage). Seems to work fine in web but not on tablets and phones, at least in the emulated ones. I have updated to 6.0.7 and still had the issue.
fix(angular): update route snapshot on query param navigation (ionic-…