Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to get the Angular version?

People also ask

How do I check my version of Angular?

Checking the Angular VersionOpen the Terminal + view in your project and type ng --version . For recent versions of Angular, this will list the versions of several Angular packages that you have installed in your project.

What is the version of Angular?

Version 12 Angular 12 was released on May 12, 2021.

How do you check Angular is installed or not?

Go to your folder path in cmd where your angular is installed and type ng --version it will show your angular version.

Which Angular version is a current version?

Angular 8. Angular 8 is released in May 2019. synchronized released with Angular CLI 8 and Angular Material 8.


ng version

You installed angular cli globally (-g in the command). This means that you can type ng version into your command prompt. It may be more precise to do this when your command prompt is not within a npm controlled directory (you should type this in within directory you typed ng new myapp).

A note to those who got here from Google: ng version will let you know which (coarse) version of Angular is referenced by the current directory. e.g. This directory appears to have angular 4.x (~4.3.0) installed.

@angular/cli: 1.2.1
node: 8.11.1
os: win32 x64
@angular/common: 4.3.0
@angular/compiler: 4.3.0
@angular/core: 4.3.0
@angular/forms: 4.3.0
@angular/http: 4.3.0
@angular/platform-browser: 4.3.0
@angular/platform-browser-dynamic: 4.3.0
@angular/router: 4.3.0
@angular/cli: 1.2.1
@angular/compiler-cli: 4.3.0

If you are not within a directory which has a packages.config, then you will get Angular: ....


For Angular 1 or 2 (but not for Angular 4+):

You can also open the console and go to the element tab on the developer tools of whatever browser you use.

Or

Type angular.version to access the Javascript object that holds angular version.

For Angular 4+ There is are the number of ways as listed below :

Write below code in the command prompt/or in the terminal in the VS Code. (up to 3)

  1. ng version or ng --version (Find the image for the reference)
  2. ng v
  3. ng -v

In the terminal you can find the angular version as shown in the attached image : enter image description here

  1. You can also open the console and go to the element tab on the developer tools of whatever browser you use. As displayed in the below image :

enter image description here

  1. Find the package.json file, You will find all the installed dependencies and their version.

You should check package.json file in the project. There you will see all packages installed and versions of those packages.


In Command line we can check our installed ng version.

ng -v OR ng --version OR ng version

This will give you like this :

 _                      _                 ____ _     ___

   / \   _ __   __ _ _   _| | __ _ _ __     / ___| |   |_ _|
  / △ \ | '_ \ / _` | | | | |/ _` | '__|   | |   | |    | |
 / ___ \| | | | (_| | |_| | | (_| | |      | |___| |___ | |
/_/   \_\_| |_|\__, |\__,_|_|\__,_|_|       \____|_____|___|
               |___/

Angular CLI: 1.6.5
Node: 8.0.0
OS: linux x64
Angular: 
...

ng v

Simply run the command above in terminal.


I think the answer given by D. Squire was accurate, but possibly only a tad vague. If you change directories to a project and then type ng --version, it will display the angular version in the project. If done from a default directory (not within a project), you will only get the Angular CLI version, which is probably not what you are looking for and will give the output shown by Vik2696.

$ cd my-project
$ ng --version   // done within project directory

Angular CLI: 1.6.8
Node: 8.9.4
OS: win32 x64
Angular: 5.2.5
... animations, common, compiler, compiler-cli, core, forms
... http, language-service, platform-browser
... platform-browser-dynamic, router

@angular/cli: 1.6.8
@angular-devkit/build-optimizer: 0.0.42
@angular-devkit/core: 0.0.29
@angular-devkit/schematics: 0.0.52
@ngtools/json-schema: 1.1.0
@ngtools/webpack: 1.9.8
@schematics/angular: 0.1.17
typescript: 2.5.3
webpack: 3.10.0

Use one of these commands in the terminal (with the Angular CLI installed already):

$ ng --version 

or

$ ng v

But note that depending on the folder you are in, you will get different results.

If you are NOT in an angular project folder, then will see a result like this with no clearly stated Angular: version line, unless referring to the angular core in the package block (as the version) :)

Angular CLI: 11.0.4
Node: 14.15.1
OS: win32 x64

Angular:
...
Ivy Workspace:

Package                      Version
------------------------------------------------------
@angular-devkit/architect    0.1100.4 (cli-only)
@angular-devkit/core         11.0.4 (cli-only)
@angular-devkit/schematics   11.0.4 (cli-only)
@schematics/angular          11.0.4 (cli-only)
@schematics/update           0.1100.4 (cli-only)

And if you run the command IN an angular project folder, you will see a similar result like this with the Angular: 8.2.14 clearly stated (plus some dots).

Angular CLI: 8.3.29
Node: 14.15.1
OS: win32 x64
Angular: 8.2.14
... core

Package                             Version
-------------------------------------------------------------
@angular-devkit/architect           0.803.29
@angular-devkit/core                8.3.29
@angular-devkit/schematics          8.3.29
@angular/cli                        8.3.29
@angular/common                     2.4.10
@angular/compiler                   2.4.10
@angular/compiler-cli               2.4.10
@angular/forms                      2.4.10
@angular/http                       2.4.10
@angular/platform-browser           2.4.10
@angular/router                     3.4.10
...