What this thread does
Do first: run ng version, then use ng generate @angular/core:standalone --mode=convert-to-standalone --path=src/app/orders on an already-building feature (CLI, migration).
Short answer
As of November 2026, this card targets existing Angular 20.3.0 applications, with its September 10, 2025 changelog. Replace the example path with the feature directory. Preserve behavior and injector lifetime between them.
Choose / don't choose
- Feature-only conversion: choose for incremental adoption; don't replace the root bootstrap just to convert one feature.
- loadComponent: choose when the lazy loader resolves a lazy-loaded component; don't return a route array.
- loadChildren: choose for lazy-loaded child routes; don't flatten paths, guards or injector boundaries during declaration conversion (Route API, route guide).
Not for: Angular template import errors alone; see angular-ng8001-ng8002-template-import-scope.
Settings that matter
| Setting or flag | Value / default | Applies to | Source |
|---|---|---|---|
--mode | convert-to-standalone first (default), then prune-ng-modules, then standalone-bootstrap for application conversion | Angular baseline linked above | schema |
--path | Feature directory relative to project root | Current migration docs, November 2026 | migration |
standalone | Remove standalone: false as the schematic does; inspect converted declarations | Angular baseline linked above | Component API, conversion |
imports | Dependencies added to the imports array | Angular baseline linked above | Component API |
loadComponent | Loader resolving a component | Angular baseline linked above | Route API |
loadChildren | Loader resolving a collection of lazy-loaded routes | Angular baseline linked above | LoadChildrenCallback |
Order of operations
1. Capture input/output, validation, navigation and service-state behavior before conversion. Start from a saved, compiling baseline. Inspect template dependencies and files outside the schematic's tsconfig coverage (implementation, limitations). 2. Convert declarations first. The example SharedModule imports Greeter after conversion. Inspect child components, forms and pipes. Run ng build and feature interaction checks before proceeding (build). 3. Import the standalone component in TestBed, preserving mocks/providers. Run the existing ng test target and compare observable inputs, events, submission and navigation (component basics, TestBed, test). 4. Run scoped prune-ng-modules only after that checkpoint. Keep modules with providers, bootstrap configuration, meaningful members or imports that prevent removal; resolve every TODO(standalone-migration) deliberately. Rebuild and compare behavior (removal rules). 5. Preserve each provider's intended injector boundary. Each instance of VillainsList has its own VillainsService; an application-wide singleton would share the same service instance. Compare two instances, navigation away/back, initialization and destruction (hierarchy, baseline hierarchy). 6. For an application-wide conversion, run standalone-bootstrap last; inspect root providers/initializers and repeat behavior checks. Server rendering must preserve the BootstrapContext handoff described by the linked release. Feature conversion alone does not require a bootstrap replacement.
Known failures and fixes
| Error (short quote or symptom) | Cause | Fix | Source |
|---|---|---|---|
is not a known element | Template dependency or NgModule export is incorrect | Inspect selector/imports; restore actual dependency rather than masking Angular import errors with a schema | NG8001 |
No Provider Found | No corresponding provider declared | Trace the failing token and restore the original intended feature/route/application provider scope | NG0201, baseline hierarchy |
| Component used before initialization | Components are used before initialisation | Inspect the cycle; apply appropriate forwardRef or refactor, then repeat interactions | enea4science, July 15, 2023 |
The linked report describes tests failing because of providers. That older application's experience supports reviewing generated dependencies; it does not establish compatibility for this application's libraries.
Missing
- Actual providers, third-party imports and behavior assertions are unspecified. Keep modules that still carry necessary configuration; deleting every module is not the feature success criterion.
Checked
2026-11-23; Angular release/changelog, schematic schema, migration/implementation, versioned component/route/injector references, error/testing/CLI pages and DSpace report read. No Angular commands executed.
Started from a post by @Angular, packaged by the editor. Original post