Skip to content

docs(angular): document standalone and lazy import path changes#4576

Open
OS-jacobbell wants to merge 2 commits into
major-9.0from
FW-7607
Open

docs(angular): document standalone and lazy import path changes#4576
OS-jacobbell wants to merge 2 commits into
major-9.0from
FW-7607

Conversation

@OS-jacobbell

Copy link
Copy Markdown

Description

Documentation for ionic-team/ionic-framework#31217

Ionic 9 changes import paths for lazy and standalone Angular components to make standalone the default. This PR updates references to these paths and documents migration.

Change Type

  • Fix
  • Feature
  • Refactor
  • Breaking Change
  • Documentation
  • Other (CI, chores, etc.)

Platforms Affected

  • Android
  • iOS
  • Web

@OS-jacobbell OS-jacobbell requested a review from a team as a code owner July 9, 2026 17:02
@OS-jacobbell OS-jacobbell requested review from ShaneK and removed request for a team July 9, 2026 17:02
@vercel

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

Request Review

import { bootstrapApplication } from '@angular/platform-browser';
import { RouteReuseStrategy, provideRouter, withPreloading, PreloadAllModules } from '@angular/router';
import { IonicRouteStrategy, provideIonicAngular } from '@ionic/angular';
import { IonicRouteStrategy, provideIonicAngular } from '@ionic/angular/lazy';

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
import { IonicRouteStrategy, provideIonicAngular } from '@ionic/angular/lazy';
import { IonicRouteStrategy, provideIonicAngular } from '@ionic/angular';

This tutorial is a standalone app (bootstrapApplication + provideIonicAngular()), so this import should stay on @ionic/angular under the new default. provideIonicAngular is standalone-only and isn't exported from @ionic/angular/lazy, so following this verbatim gives a broken import. I'd want this fixed before approving.

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.

These docs got updated to match the tutorial app when it was updated here: #4569

/* example.component.ts */
import { Component, ViewChild } from '@angular/core';
import { IonInput } from '@ionic/angular';
import { IonInput } from '@ionic/angular/lazy';

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.

This doc only has a single "Angular" tab, so it's the canonical example, and pointing IonInput at @ionic/angular/lazy steers standalone users (the new default) toward the lazy submodule. That also works against the treeshaking warning you're adding in build-options.md. I think this should be @ionic/angular, or split into angular/angular-standalone tabs like the other developing docs. Same thing on line 170. What do you think?

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.

These docs got updated to match the tutorial app when it was updated here: #4569

Comment thread docs/updating/9-0.md

#### Component Imports

Ionic 9 makes standalone components the default import path. Change Lazy-loaded component imports from `@ionic/angular` to `@ionic/angular/lazy`. Change Standalone component imports from `@ionic/angular/standalone` to `@ionic/angular`.

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
Ionic 9 makes standalone components the default import path. Change Lazy-loaded component imports from `@ionic/angular` to `@ionic/angular/lazy`. Change Standalone component imports from `@ionic/angular/standalone` to `@ionic/angular`.
Ionic 9 makes standalone components the default import path. Change lazy-loaded component imports from `@ionic/angular` to `@ionic/angular/lazy`. Change standalone component imports from `@ionic/angular/standalone` to `@ionic/angular`.

Nit: Lazy-loaded and Standalone are capitalized mid-sentence. Lowercased them here. No worries if you'd rather leave it.

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