Uninstall and Reinstall Angular

We are interested in a specific angular version and NOT in a specific angular-cli version (angular-cli is just a tool after all).

Here are the steps (All these steps are done in npm);

If you’re not sure of the angular-cli version installed in your environment, uninstall it.

npm uninstall -g @angular/cli

Then, run (–force flag might be required).

npm cache clean

or, if you’re using npm > 5.

npm cache verify

Install an angular-cli specific version.

npm install -g @angular/cli@wished.version.here

Create a project

ng new you-app-name

The resulting white app will be created in the desired angular version.

I have not found any page displaying the compatibility matrix of angular and angular-cli. So I guess the only way to know what angular-cli version should be installed is to try various versions, create a new project and checkout the package.json to see which angular version is used.

angular versions changelog Here is the changelog from github reposition, where you can check available versions and the differences.

Reference

https://stackoverflow.com/questions/43344600/how-to-install-a-specific-version-of-angular-with-angular-cli

FavoriteLoadingAdd to favorites
Spread the love

Author: Shahzad Khan

Software developer / Architect