Skip to content

docs(angular): fix hardware back button exit example - #4776

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

ShaneK wants to merge 1 commit into
mainfrom
FW-6289

Conversation

@ShaneK

@ShaneK ShaneK commented Oct 6, 2026

Copy link
Copy Markdown
Member

Issue number: resolves #3583


What is the current behavior?

Currently, the Angular "Exiting the App" examples inject IonRouterOutlet through the constructor. In AppComponent, where most apps put this, that resolves to null and the first back press throws.

What is the new behavior?

The examples now query the outlet with @ViewChild and null-check it, with a sentence explaining why. Applied to v9 and v8.

Does this introduce a breaking change?

  • Yes
  • No

Other information

Tested on Ionic 8 and 9, standalone and NgModule. The old snippet throws in all four, the new one exits at the root and navigates back elsewhere

@ShaneK
ShaneK requested a review from a team as a code owner October 6, 2026 19:07
@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-docs Ready Ready Preview Oct 6, 2026 7:08pm UTC

Request Review

This branch was successfully deployed

1 active deployment
Preview — 9c425dcd 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

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

content: Example shows uncommon IonRouterOutlet usage

1 participant