How to Upgrade Angular Version in Existing Angular Project
Just like Web and the entire web ecosystem, Angular is continuously improving. Angular balances continuous improvement with a strong focus on stability and making updates straightforward. Keeping your Angular application up-to-date enables you to take advantage of leading-edge new features, as well as optimizations and bug fixes.
☝️Note: Here we will see the update from version 12.2.0 to 13.1.2
This article contains information and steps to help you upgrade the Angular version in an existing project.
Let’s Dive In
Step 1: Install an Angular Project
Create a project by running the command:
$ ng new angular-tour
open the package.json project
Here we can able to see, the project which is been created is in version 12.2.0
Step 2: Upgrade the Angular Version
Open the Terminal and run the command:
$ npx --legacy-peer-deps @angular/cli@13 update @angular/core@13 @angular/cli@13
and again see the package.json
Now your project angular version will get updated and you’ll be able to see 13.1.2 instead of 12.2.0
Your Angular version is updated in your existing Angular Project
Now, you can run the Angular application by using the below command:
$ ng serve
Step 3: Test the work
Startup the server and open the project URL on the browser.
The project URL is http://localhost:4200
Hit this URL on the browser
Now you are good to go with your app creation.
Conclusion
In this article, We have seen, how to upgrade the angular version in an existing Angular Project.
Read my other articles:
If you like this article, give it a clap 👏