Conversation
Resolve zoneless.mdx: keep the Angular 22 change detection section from this branch and take main's .md -> .mdx link rewrite. Also point the zoneless links added on this branch at the new .mdx path.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
thetaPC
approved these changes
Sep 2, 2026
thetaPC
left a comment
Contributor
There was a problem hiding this comment.
LGTM, minor suggestion to make it easier for devs to quickly read the info they need based on their version.
Co-authored-by: Maria Hutt <thetaPC@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What's currently wrong
The lifecycle page has said for years that a component using
ion-navorion-router-outletshouldn't useOnPush, and that setting it will stopngOnInitfrom firing. That's wrong on a couple of counts. ThengOnInitpart isn't true in either change detection mode, andion-navwas never affected either, because its pages get attached as root views instead of as children of the component hosting the nav. The page also never explained the why, which is what #1758 was asking for back in 2020.What's changing and why
When Angular runs change detection it walks down from the root of your app, and a clean
OnPushcomponent stops the walk there and skips everything underneath it. So if any component above yourion-router-outletisOnPush, the routed page inside it never gets checked, and a plain field you set after anawaitwon't render. On Angular 18 through 21 that only happens if you setOnPushyourself. Angular 22 makesOnPushthe default for any component that doesn't declare a strategy, so it can now happen without you touching anything.We fixed our side of it in ionic-team/ionic-framework#31414, where every Ionic component declares a strategy explicitly so
ion-router-outletandion-tabsstay eager. This PR helps users understand why if they happen to be using zone.js, Angular 22, and plain fields. The lifecycle note now says which components have to stay eager and what your options are if you'd rather not do that. The zoneless guide gets a "Change detection on Angular 22" section with anapp-rootexample.