How to Check Angular Version

There are three ways in which you can check Angular Version (or Angular CLI Version)

  1. Use the command ng version (or ng v) to find the version of Angular CLI in the current folder. Run it outside of the Angular project, to find out the globally installed version of Angular.
  2. Use the npm list --depth 0 to find out the list of packages installed in the current folder. Add the -g (global) flag (npm list -g --depth 0), to find the global version.
  3. You can also open the package.json and look for the version of @angular/cli package

Using ng version

Where you run ng version (or ng v ) is important.

If you run it inside an Angular project folder, then it will list the locally installed Angular CLI Version

Run it outside the Angular folder to find out the globally installed Angular Version.

Output

Local Version

Here we run the ng v in an Angular 8 project folder

Output

Using npm list

npm command npm list gives the packages installed in the current folder.

The global flag -g (or --global) lists all packages installed globally.

We must also include the flag --depth 0, which lists only the top-level packages. Use --depth 1, --depth 2, etc., to discover the version of dependencies.

Local version

This will give you packages installed in the current folder. We run it on an Angular 8 project folder.

output

Using package.json

Open the package.json file and look for the  @angular/cli under the devDependencies node.

Here is a typical package.json file

References

ng-version

1 thought on “How to Check Angular Version”

Leave a Comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Scroll to Top