Angular Upgrade Guide

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

9Changes
3Breaking
7Actions
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 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.

Upgrade to Angular 22.0.x

Node.js
^22.22.3 || ^24.15.0 || ^26.0.0
TypeScript
>=6.0.0 <6.1.0
RxJS
^6.5.3 || ^7.4.0
ng update @angular/cli@~22.0 @angular/core@~22.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

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.

Move the compiler toolchain to TypeScript 6.0

Action required
typescripthigh impact

Angular 22.0 requires the TypeScript 6.0 line. Earlier compiler versions are outside its supported range.

Migration

Let ng update coordinate the compiler packages, then build and type-check your application and libraries.

Tooling

Update local and CI Node.js runtimes

Action required
toolinghigh impact

Angular 22.0 raises its supported Node.js versions. Check development, build and SSR environments.

Migration

Use a Node version from the requirement table before the 22.0 migration. Check CI images and deployment runtimes too.

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.