Skip to content

docs(angular): deprecate IonicModule#4589

Open
thetaPC wants to merge 5 commits into
major-9.0from
FW-6267
Open

docs(angular): deprecate IonicModule#4589
thetaPC wants to merge 5 commits into
major-9.0from
FW-6267

Conversation

@thetaPC

@thetaPC thetaPC commented Jul 16, 2026

Copy link
Copy Markdown
Contributor

Issue URL: internal

What is the current behavior?

The Angular documentation presents the Modules approach and IonicModule as a fully supported option with no indication that it is being phased out. The Build Options guide, the per config guides, and the Platform guide all show IonicModule.forRoot() examples, and the Ionic 9 upgrade guide does not mention the deprecation.

What is the new behavior?

  • docs/angular/build-options.md: notes that the Modules approach and IonicModule are deprecated as of Ionic 9, adds a Deprecation Notice admonition to the Modules section, and adds a code splitting note explaining the single entry point limitation of the standalone build.
  • docs/updating/9-0.md: adds an IonicModule Deprecation entry that points to the migration guide.
  • docs/developing/config/* and docs/angular/platform.md: add a deprecation comment above the IonicModule examples that points developers to provideIonicAngular(). The Platform guide example is converted into Angular and Angular (Standalone) tabs so the standalone equivalent is shown alongside the Modules version.

Does this introduce a breaking change?

  • Yes
  • No

Other information

Previews:

@vercel

vercel Bot commented Jul 16, 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 Jul 17, 2026 10:17pm

Request Review

@thetaPC
thetaPC marked this pull request as ready for review July 17, 2026 17:20
@thetaPC
thetaPC requested a review from a team as a code owner July 17, 2026 17:20
@thetaPC
thetaPC requested review from OS-jacobbell and brandyscarney and removed request for a team and OS-jacobbell July 17, 2026 17:20

@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.

Looking good just a few suggestions!

Comment thread docs/angular/build-options.md Outdated
Developers have two options for using Ionic components: Standalone or Modules. This guide covers both options as well as the benefits and downsides of each approach.

While the Standalone approach is newer and makes use of more modern Angular APIs, the Modules approach will continue to be supported in Ionic. Most of the Angular examples on this documentation website use the Modules approach.
The Standalone approach makes use of modern Angular APIs and is the recommended way to use Ionic. The Modules approach and its `IonicModule` are **deprecated** as of Ionic 9 and will be removed in a future major version. Existing apps continue to work, but new apps should use the Standalone approach, and existing apps should plan to migrate. Refer to [Migrating from Modules to Standalone](#migrating-from-modules-to-standalone).

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.

Suggested change
The Standalone approach makes use of modern Angular APIs and is the recommended way to use Ionic. The Modules approach and its `IonicModule` are **deprecated** as of Ionic 9 and will be removed in a future major version. Existing apps continue to work, but new apps should use the Standalone approach, and existing apps should plan to migrate. Refer to [Migrating from Modules to Standalone](#migrating-from-modules-to-standalone).
The Standalone approach uses modern Angular APIs and is the recommended way to build Ionic applications. The Modules approach, including `IonicModule`, is **deprecated** and will be removed in a future major release. New projects should use the Standalone approach. Existing apps will continue to work but should plan to migrate. Refer to [Migrating from Modules to Standalone](#migrating-from-modules-to-standalone) for migration guidance.

I don't think we need to mention "as of Ionic 9" since the deprecation warning will only show up on v9.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Comment thread docs/angular/build-options.md Outdated
Developers can use Ionic components as standalone components to take advantage of treeshaking and newer Angular features. This option involves importing specific Ionic components in the Angular components you want to use them in. Developers can use Ionic standalone components even if their Angular application is NgModule-based.

See the [Standalone Migration Guide](#migrating-from-modules-to-standalone) for instructions on how to update your Ionic app to make use of Ionic standalone components.
Refer to the [Standalone Migration Guide](#migrating-from-modules-to-standalone) for instructions on how to update your Ionic app to make use of Ionic standalone components.

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.

Suggested change
Refer to the [Standalone Migration Guide](#migrating-from-modules-to-standalone) for instructions on how to update your Ionic app to make use of Ionic standalone components.
Refer to the [Standalone Migration Guide](#migrating-from-modules-to-standalone) for instructions on migrating your Ionic app to the Standalone approach.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Comment thread docs/angular/build-options.md Outdated
1. Ionic components need to be imported into every Angular component they are used in which can be time consuming to set up.

:::info Code splitting
Ionic ships standalone components from a single entry point (`@ionic/angular`). Bundlers such as Webpack and esbuild cannot split code from a single entry point across separate chunks, so the Ionic components you import are included in the main bundle rather than in the chunk for the route or component where they are used. Unused components are still tree-shaken out of the build. Refer to the [code splitting tracking issue](https://github.com/ionic-team/ionic-framework/issues/28574) for details.

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.

It seems weird to link to this issue - the issue is closed as not planned.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Comment thread docs/angular/build-options.md Outdated
## Modules

:::warning Deprecation Notice
The Modules approach and its `IonicModule` are deprecated as of Ionic 9 and will be removed in a future major version. `IonicModule` remains fully functional in Ionic 9, so existing apps continue to work without changes. New apps should use the [Standalone](#standalone) approach, and existing apps should plan to migrate using the [migration guide](#migrating-from-modules-to-standalone).

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.

Suggested change
The Modules approach and its `IonicModule` are deprecated as of Ionic 9 and will be removed in a future major version. `IonicModule` remains fully functional in Ionic 9, so existing apps continue to work without changes. New apps should use the [Standalone](#standalone) approach, and existing apps should plan to migrate using the [migration guide](#migrating-from-modules-to-standalone).
The Modules approach, including `IonicModule`, is **deprecated** and will be removed in a future major release. Existing applications will continue to work during the deprecation period but should migrate using the [Standalone migration guide](#migrating-from-modules-to-standalone). New applications should use the [Standalone](#standalone) approach.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Comment thread docs/angular/platform.md Outdated
Comment thread docs/developing/config/global/index.md Outdated

```tsx title="app.module.ts"
/*
* IonicModule is deprecated as of Ionic 9 and will be removed in a future major version.

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.

Suggested change
* IonicModule is deprecated as of Ionic 9 and will be removed in a future major version.
* IonicModule is deprecated and will be removed in a future major version.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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


```ts
/*
* IonicModule is deprecated as of Ionic 9 and will be removed in a future major version.

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.

Suggested change
* IonicModule is deprecated as of Ionic 9 and will be removed in a future major version.
* IonicModule is deprecated and will be removed in a future major version.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

```ts title="app.module.ts"
/*
* IonicModule is deprecated as of Ionic 9 and will be removed in a future major version.

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.

Suggested change
* IonicModule is deprecated as of Ionic 9 and will be removed in a future major version.
* IonicModule is deprecated and will be removed in a future major version.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

```ts title="app.module.ts"
/*
* IonicModule is deprecated as of Ionic 9 and will be removed in a future major version.

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.

Suggested change
* IonicModule is deprecated as of Ionic 9 and will be removed in a future major version.
* IonicModule is deprecated and will be removed in a future major version.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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


```ts title="app.module.ts"
/*
* IonicModule is deprecated as of Ionic 9 and will be removed in a future major version.

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.

Suggested change
* IonicModule is deprecated as of Ionic 9 and will be removed in a future major version.
* IonicModule is deprecated and will be removed in a future major version.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

thetaPC and others added 3 commits July 17, 2026 15:03
Co-authored-by: Brandy Carney <6577830+brandyscarney@users.noreply.github.com>
Co-authored-by: Brandy Smith <brandyscarney@users.noreply.github.com>
Co-authored-by: Brandy Carney <6577830+brandyscarney@users.noreply.github.com>
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