Skip to content

fix(angular): update route snapshot on query param navigation - #31534

Open
ShaneK wants to merge 1 commit into
mainfrom
FW-6957
Open

ShaneK wants to merge 1 commit into
mainfrom
FW-6957

Conversation

@ShaneK

@ShaneK ShaneK commented Oct 6, 2026

Copy link
Copy Markdown
Member

Issue number: resolves #24587


What is the current behavior?

Currently, the ActivatedRoute that ion-router-outlet injects into a page copies snapshot once, when the page is activated. A navigation that only changes query params reuses the page without re-activating the outlet, so route.snapshot stays stale (e.g., snapshot.queryParamMap.get('foo') is null after navigating to ?foo=bar).

What is the new behavior?

The proxy's snapshot now reads from the route it stands in for, so it always matches the current URL.

Does this introduce a breaking change?

  • Yes
  • No

Other information

The issue's broken relative links stopped reproducing once Angular started building URL trees from the snapshot itself (all supported versions do). The stale snapshot behind it was still there. The new spec also covers relative links so the original symptom stays fixed, but reverting this fix will not break that test because it's just to make sure this issue doesn't come up again even though it's technically not a problem right now.

@ShaneK
ShaneK requested a review from a team as a code owner October 6, 2026 20:06
@ShaneK
ShaneK requested a review from thetaPC October 6, 2026 20:06
@vercel

vercel Bot commented Oct 6, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
ionic-framework Ready Ready Preview Oct 6, 2026 8:09pm UTC

Request Review

This branch was successfully deployed

1 active deployment
Preview — 385d2f22 Deployed Oct 6, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

package: angular @ionic/angular package

Projects

None yet

Development

Successfully merging this pull request may close these issues.

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

1 participant