Introduction
In this post, we’ll discuss how to upgrade Angular to the latest version.
Steps
Suppose the current Angular version is 16.0.0, and the latest version is 17.0.0. Here are the steps to upgrade Angular to the latest version:
Update Node.js
First, make sure you have the latest version of Node.js installed on your machine. You can download the latest version from the official Node.js website.
Update Angular core/cli
Navigate to your Angular project root directory and run the following command to update Angular CLI to the latest version:
1 | ng update @angular/core@16 @angular/cli@16 |
Update Angular Material/CDK
If your project use Angular Material or Angular CDK, you can update them to the latest version by running the following command:
1 | ng update @angular/material@16 @angular/cdk@16 |
Update 3rd-party libraries
If your project uses any 3rd-party libraries, make sure to update them to the latest compatible version with Angular 17.
- Jest
- Cypress
- …