Angular Upgrade Guide

Compare Angular versions and see exactly what changes, what requires action, and what you can start using.

10Changes
4Breaking
8Actions
2Features
0Migration tools
Analyze your project

Check your package.json

UpgradePath detects relevant tools and selects them automatically.

Local only
Analyzed locally in your browser. Nothing is uploaded.
Project setup

What does your project use?

Select the tools in your project to include relevant dependency updates in this guide.

Angular migration plan

One major at a time

These guides cover each major's initial minor line (for example, 20.0.x). Commands select its latest patch. Later minors can have different toolchain ranges. Review the official update guide for the complete checklist.

Upgrade to Angular 19.0.x

Node.js
^18.19.1 || ^20.11.1 || ^22.0.0
TypeScript
>=5.5.0 <5.7.0
RxJS
^6.5.3 || ^7.4.0
ng update @angular/cli@~19.0 @angular/core@~19.0

Check this step's runtime first, review migration edits, then build and test before proceeding. Keep Angular core, compiler and CLI aligned. Update Material/CDK and other integrations with their own migrations when installed.

Upgrade to Angular 20.0.x

Node.js
^20.19.0 || ^22.12.0 || ^24.0.0
TypeScript
>=5.8.0 <5.9.0
RxJS
^6.5.3 || ^7.4.0
ng update @angular/cli@~20.0 @angular/core@~20.0

Check this step's runtime first, review migration edits, then build and test before proceeding. Keep Angular core, compiler and CLI aligned. Update Material/CDK and other integrations with their own migrations when installed.

Upgrade to Angular 21.0.x

Node.js
^20.19.0 || ^22.12.0 || ^24.0.0
TypeScript
>=5.9.0 <6.0.0
RxJS
^6.5.3 || ^7.4.0
ng update @angular/cli@~21.0 @angular/core@~21.0

Check this step's runtime first, review migration edits, then build and test before proceeding. Keep Angular core, compiler and CLI aligned. Update Material/CDK and other integrations with their own migrations when installed.

Official compatibility table ↗

Breaking Changes

Standalone declarations become the default

Action required
breakinghigh impact

Components, directives and pipes default to standalone. Existing NgModule declarations need an explicit opt-out.

Beforetypescript
@Component({ selector: "app-example", template: "Hello" })
export class ExampleComponent {}
Aftertypescript
// For a component still declared by an NgModule:
@Component({ standalone: false, selector: "app-example", template: "Hello" })
export class ExampleComponent {}
Migration

Run the CLI migration, then check NgModule declarations for standalone: false.

afterRender becomes afterEveryRender

Action required
breakingmedium impact

The render hook has a new name. Update imports and calls during migration.

Migration

Replace afterRender with afterEveryRender and review any render-dependent tests.

Use TestBed.inject instead of TestBed.get

Action required
breakingmedium impact

The deprecated TestBed.get API is removed.

Migration

Update test service lookups to TestBed.inject with typed provider tokens.

Zoneless change detection is the default

Action required
breakinghigh impact

Review code that depends on Zone.js notifications. The update migration preserves zone-based behavior where needed.

Migration

Review generated providers before removing Zone.js. Test UI updates, third-party integrations and async rendering.

New Features

Router redirects can be asynchronous

featuremedium impact

Redirect functions can now resolve asynchronously.

Migration

Consider asynchronous redirects when route decisions depend on asynchronously available data.

Signal Forms arrive as an experiment

featuremedium impact Experimental

Angular 21 introduces experimental signal-based forms alongside existing forms APIs.

Migration

Evaluate in an isolated feature; upgrading does not require rewriting existing forms.

TypeScript

Host bindings are type checked by default

Action required
typescriptmedium impact

Previously hidden type mismatches in host bindings can become compiler errors.

Migration

Build the application and correct incompatible host binding values.

Behavior Changes

Review effect scheduling tests

Action required
behaviormedium impact

Effects can run at different points in change detection. Tests that assumed microtask timing may need adjustment.

Migration

Exercise signal-driven components and wait for Angular stability before asserting asynchronous UI changes.

Empty projection slots use fallback content

Action required
behaviormedium impact

createComponent renders fallback content when projectableNodes contains an empty slot.

Migration

Check dynamic component projection. Pass an empty text node when deliberately suppressing fallback content.

Deprecations

Legacy structural directives are deprecated

Action required
deprecationmedium impact

NgIf, NgFor and NgSwitch are deprecated in favor of built-in template control flow.

Beforehtml
<p *ngIf="ready">Ready</p>
Afterhtml
@if (ready) { <p>Ready</p> }
Migration

Review the control-flow migration and test tracking behavior after converting templates.