Skip to content

docs(angular): add zoneless change detection guide and update v9 upgrade guidance#4541

Merged
ShaneK merged 2 commits into
major-9.0from
feat/zoneless-v2
Jun 9, 2026
Merged

docs(angular): add zoneless change detection guide and update v9 upgrade guidance#4541
ShaneK merged 2 commits into
major-9.0from
feat/zoneless-v2

Conversation

@ShaneK

@ShaneK ShaneK commented Jun 5, 2026

Copy link
Copy Markdown
Member

Providing documentation related to zoneless Angular support in Ionic Framework

@ShaneK ShaneK requested a review from a team as a code owner June 5, 2026 21:09
@ShaneK ShaneK requested review from gnbm and removed request for a team June 5, 2026 21:09
@vercel

vercel Bot commented Jun 5, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated (UTC)
ionic-docs Ready Ready Preview, Comment Jun 9, 2026 7:36pm

Request Review

@brandyscarney brandyscarney left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great! Left some comments.

Comment thread docs/updating/9-0.md Outdated
Comment thread docs/angular/zoneless.md Outdated
Comment thread docs/angular/zoneless.md Outdated
Comment thread docs/angular/zoneless.md Outdated
Comment thread docs/angular/zoneless.md Outdated
Comment thread docs/angular/zoneless.md Outdated
Comment thread docs/angular/zoneless.md Outdated
Comment thread docs/angular/zoneless.md
ShaneK added a commit to ionic-team/ionic-framework that referenced this pull request Jun 9, 2026
Issue number: resolves #30804

---------

## What is the current behavior?

Currently, on `major-9.0`, `@ionic/angular` still defaulted to Zone.js.
The `ng add` schematic registered `provideZoneChangeDetection()`, and
`zone.js` was a required peer dependency on both `@ionic/angular` and
`@ionic/angular-server`. Angular 21 bootstraps zoneless out of the box,
so Ionic was actively opting new apps back into Zone.js.


## What is the new behavior?

Ionic 9 now defaults to zoneless change detection while keeping Zone.js
as a supported opt-in. The `ng add` schematic no longer registers
`provideZoneChangeDetection()`, and `zone.js` is now an optional peer
dependency on both `@ionic/angular` and `@ionic/angular-server`.


## Does this introduce a breaking change?

- [X] Yes
- [ ] No

Apps that want to keep Zone.js on Angular 21 must opt back in with
`provideZoneChangeDetection()` AND keep `import 'zone.js'` in their
polyfills (Angular 21's default scaffold omits it). Under zoneless,
state updated from async callbacks Angular doesn't wrap needs a signal
or a `markForCheck()` call. Template bindings, `@HostListener`, reactive
forms, and synchronous lifecycle-hook state are unaffected. Angular 18
through 20 keep Angular's Zone.js default and need no change.
BREAKING.md is updated with the full migration path.

## Other information

- Test apps run dual-mode for coverage: ng21 is zoneless, ng18-20 stay
on Zone.js. Shared `base/` test pages use the new `assertZoneContext()`
helper (`base/src/app/zone-assert.util.ts`), which asserts in-zone only
when Zone.js is present, so the same pages pass in both modes.

Current dev build (2026-06-08):
```
8.8.9-dev.11781013468.1ed93da9
```

Test app:
https://ionic-framework-git-feat-zoneless-ionic1.vercel.app/angular/

Docs PR: ionic-team/ionic-docs#4541
Docs Preview URL:
https://ionic-docs-git-feat-zoneless-v2-ionic1.vercel.app/docs/updating/9-0#zoneless-change-detection

@brandyscarney brandyscarney left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for updating this! Love the new structure.

@ShaneK ShaneK merged commit dc14906 into major-9.0 Jun 9, 2026
4 checks passed
@ShaneK ShaneK deleted the feat/zoneless-v2 branch June 9, 2026 19:59
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.

2 participants