Skip to content

feat(angular): support Angular 21, drop Angular 16 and 17#31185

Open
ShaneK wants to merge 16 commits into
major-9.0from
feat/angular-21-support
Open

feat(angular): support Angular 21, drop Angular 16 and 17#31185
ShaneK wants to merge 16 commits into
major-9.0from
feat/angular-21-support

Conversation

@ShaneK
Copy link
Copy Markdown
Member

@ShaneK ShaneK commented Jun 2, 2026

Issue number: resolves #30907


What is the current behavior?

Ionic Angular only currently supports Angular 16-20

What is the new behavior?

Ionic Angular now supports Angular 18 through 21 and drops 16 and 17. The ng16/ng17 test apps are removed, an ng21 app is added, and the tsconfigs are tightened for the 18+ minimum.

autocorrect on ion-input and ion-searchbar becomes a boolean (default false), mapped internally to the native 'on'/'off' attribute. This is required by TypeScript 5.9, which is required by Angular 21. It is the primary breaking change that forced this into a major version release of Ionic Framework.

Also bundles v9 housekeeping: @stencil/core bumped to 4.43.5 and TypeScript 5.9 in the React and Vue test apps.

Does this introduce a breaking change?

  • Yes
  • No

The following changes are required for migration:

  • Apps on Angular 16 or 17 must upgrade to 18 or later.
  • Existing NgModule projects upgrading to Angular 21 must add provideZoneChangeDetection() to bootstrapModule's applicationProviders in main.ts. ng-add only patches standalone app.config.ts, not main.ts, so the NgModule path is manual (documented in the schematic's JSDoc).
  • autocorrect now takes true/false instead of 'on'/'off'. Replace autocorrect="on" with [autocorrect]="true" and autocorrect="off" (or the default) with false.

Other information

Preview:

Current dev build (2025-06-02):

8.8.9-dev.11780414486.1df2bd72

Docs PR: ionic-team/ionic-docs#4529

@ShaneK ShaneK requested a review from a team as a code owner June 2, 2026 13:25
@ShaneK ShaneK requested a review from gnbm June 2, 2026 13:25
@vercel
Copy link
Copy Markdown

vercel Bot commented Jun 2, 2026

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

Project Deployment Actions Updated (UTC)
ionic-framework Ready Ready Preview, Comment Jun 4, 2026 6:10pm

Request Review

@github-actions github-actions Bot added package: core @ionic/core package package: angular @ionic/angular package package: vue @ionic/vue package package: react @ionic/react package labels Jun 2, 2026
@ShaneK ShaneK changed the title feat(angular)!: support Angular 21, drop Angular 16 and 17 feat(angular): support Angular 21, drop Angular 16 and 17 Jun 2, 2026
Copy link
Copy Markdown
Contributor

@thetaPC thetaPC left a comment

Choose a reason for hiding this comment

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

LGTM, with non-blocking requested change

Comment thread BREAKING.md Outdated
Comment thread packages/react-router/test/base/tests/e2e/specs/swipe-to-go-back.cy.js Outdated
Co-authored-by: Maria Hutt <thetaPC@users.noreply.github.com>
Copy link
Copy Markdown
Member

@brandyscarney brandyscarney left a comment

Choose a reason for hiding this comment

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

Looks good! Just a few non-blocking comments. 🎉

Comment thread BREAKING.md
- [Legacy Picker](#version-9x-legacy-picker)
- [Router Outlet](#version-9x-router-outlet)
- [Select](#version-9x-select)
- [Input and Searchbar](#version-9x-input-searchbar)
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.

We should separate these into two to match how we list other components.

Comment thread packages/vue/test/apps/vue3/package.json
}

onRefresh(event: RefresherCustomEvent) {
onRefresh(event: CustomEvent<RefresherEventDetail>) {
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.

Why was this changed? This goes against our documentation.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

The angular-output-target update made this required. Stencil no longer surfaces these narrow *CustomEvent types directly. This is actually described in BREAKING.md. This doesn't go against our documentation as far as I can tell, we're still using the interfaces described, we're just having to cast them from the CustomEvent.

})
export class ReorderGroupComponent {
onReorderEnd(event: ReorderEndCustomEvent) {
onReorderEnd(event: CustomEvent<ReorderEndEventDetail>) {
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.

Why was this changed? This goes against our documentation.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

The angular-output-target update made this required. Stencil no longer surfaces these narrow *CustomEvent types directly. This is actually described in BREAKING.md. This doesn't go against our documentation as far as I can tell, we're still using the interfaces described, we're just having to cast them from the CustomEvent.

Copy link
Copy Markdown
Member

@brandyscarney brandyscarney Jun 4, 2026

Choose a reason for hiding this comment

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

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Okay, then that needs to be updated in docs

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.

I think it should be fixed rather than updated in the docs. The other frameworks support it still.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

So this wasn't a decision by output-targets, but rather a lack of action by them. It didn't matter until Angular 21 so I guess it's been overlooked, but I have a PR to fix it here: stenciljs/output-targets#814

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

package: angular @ionic/angular package package: core @ionic/core package package: react @ionic/react package package: vue @ionic/vue package

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants