Can we install multiple versions of Angular on a single System?

If you are asked whether you can work on more than one Angular version on a single Windows system, then the simple answer is – YES, we can use multiple Angular versions.

How can we install multiple Angular versions on the same System?

Now that we know that we can work with multiple versions of Angular on a single laptop or desktop, the next question is how?

How to install Multiple Angular versions?

If you already have any version of Angular installed in your system, then it is fine, if not, then with the command given below, you will be able to install Angular globally on your laptop or desktop.

npm install -g @angular/cli

After this, we will be able to check the version of Angular with the command given below.

ng --version

As you can see I have Angular 10 installed, then we will run any old project which is made in Angular 10, or we will create a new Angular project using the below command –

ng new Angular10DemoProject

Install another version of Angular

We will install another Angular version to run a different project.

  1. Create a new folder
  2. Copy the folder location and set it as a working directory in Command Prompt.
  3. Use the below command to install the latest Angular version or any specific version
npm install @angular/cli@14 
npm install @angular/cli@latest

Check the Angular version.

4. Create a new project in this folder location using the below command

ng new project1

5. Now, run this project using the below command.

ng serve --port 4300

So, we can install one Angular version Globally and one version for the Local Project folder on the same Windows computer.

This concludes this article. I hope you found it helpful and enjoyed it.

Leave a Comment