Introduction
Upgrading a real Angular application from v19 to v22 may seem intimidating, but Angular's built-in migration tools make the process smooth and predictable. The recommended approach is to upgrade one major version at a time so that migrations are applied safely.
This guide explains:
Exact commands to run
What the Angular CLI output means
Validation steps after each upgrade
Best practices to avoid common issues
Upgrade Path: Angular 19 → 22
Angular major versions should be upgraded sequentially:
19 → 20 → 21 → 22
Each upgrade uses:
ng update @angular/core@<version> @angular/cli@<version>
Step 1: Upgrade Angular 19 → 20
1. Check Available Updates
Run:
ng update
Meaning
Angular CLI will:
Read versions from
package.jsonCompare them with available versions
Recommend update commands
Show packages requiring migration
2. CLI Output Example
You may see something similar to:
@angular-eslint/schematics 19.2.0 -> 20.x.x
@angular/cdk 19.2.0 -> 20.x.x
@angular/cli 19.2.0 -> 20.x.x
@angular/core 19.2.0 -> 20.x.x
Meaning
Left side = your current version
Right side = recommended target version
Angular suggests migration commands
Update Commands
Update Angular Core & CLI
ng update @angular/cli@20 @angular/core@20
Update Angular CDK
If using Angular Material:
ng update @angular/cdk@20
Update Angular ESLint
ng update @angular-eslint/schematics
Validate the Application
Run:
ng serve
ng test
ng build --configuration production
Fix any compilation or test issues.
Commit your code:
git add .
git commit -m "Angular 19 to 20 upgrade"
Step 2: Upgrade Angular 20 → 21
1. Check Updates
Run:
ng update
2. CLI Output Example
You may see something similar to:
@angular-eslint/schematics 20.x.x -> 21.x.x
@angular/cdk 20.x.x -> 21.x.x
@angular/cli 20.x.x -> 21.x.x
@angular/core 20.x.x -> 21.x.x
Update Commands
Update Angular Core & CLI
ng update @angular/cli@21 @angular/core@21
Update Angular CDK
ng update @angular/cdk@21
Update Angular ESLint
ng update @angular-eslint/schematics
Validate the Application
Run:
ng serve
ng test
ng build --configuration production
Fix any compilation or test issues.
Join the conversation! Your thoughts help the community grow.