Checking version of angular-cli that's installed?

node.jsAngularNpmAngular Cli

node.js Problem Overview


Is there a way to check the specific version of angular-cli that's installed globally on my machine? I'm in a Windows environment. *npm -v* and *node -v* only gives me the version of npm and node respectively, and I can't seem to find any commands with ng.

I'm trying to run a project that I'm working on, and it ran on an older version of angular-cli using npm. However, after installing other demo projects, my main project doesn't work anymore without uninstalling and reinstalling angular-cli at the specific version.

node.js Solutions


Solution 1 - node.js

angular cli can report its version when you run it with the version flag

ng --version

Solution 2 - node.js

Execute:

ng v

or

ng --version

tell you the current angular cli version number

enter image description here

Solution 3 - node.js

ng --version or short ng v kinda correct answers, but there are some important details:

> If you running ng v inside your angular cli project folder it > will show your local cli version installed in your project (package.json) > > If you running ng v outside your angular cli project folder > it will always show the global cli version

Solution 4 - node.js

You can use npm list -global to list all the component versions currently installed on your system.
For viewing specific lists at different levels use --depth.

e.g:

npm list -global --depth 0

Solution 5 - node.js

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

Solution 6 - node.js

DON'T USE ng --version because it provides a global system installed angular version.

Go to the package.json file, check the "@angular/core" version. It is an actual project version.

enter image description here

Solution 7 - node.js

Simply just enter any of below in the command line,

> ng --version OR ng v OR ng -v

The Output would be like,

Screenshot

Not only the Angular version but also the Node version is also mentioned there. I use Angular 6.

Solution 8 - node.js

Simply run the following command :

ng v

Solution 9 - node.js

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: 
...

Solution 10 - node.js

Simple run the following commands:

ng --version 

OR

 ng -v

Output on terminal:

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

Angular CLI: 6.0.8
Node: 10.15.0
OS: linux x64 

Solution 11 - node.js

ng version or ng --version or ng v OR ng -v

You can use this 4 commands to check the which version of angular-cli installed in your machine.

Solution 12 - node.js

You can find using CLI ng --version

As I am using

angular-cli: 1.0.0-beta.28.3

node: 6.10.1

os: darwin x64

enter image description here

Solution 13 - node.js

ng --version

ng--version output

Please take a look at the above image.

Solution 14 - node.js

If you want to show version on your page, My version is Angular 12:

import { Component, VERSION} from '@angular/core';

then :

export class AppComponent {
  title = 'version-twelve';
  version = VERSION.full;
}

HTML:

<span>{{version}}</span>

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionbunndanView Question on Stackoverflow
Solution 1 - node.jsMeirView Answer on Stackoverflow
Solution 2 - node.jsLegendsView Answer on Stackoverflow
Solution 3 - node.jsangularrocks.comView Answer on Stackoverflow
Solution 4 - node.jsHimanshuView Answer on Stackoverflow
Solution 5 - node.jsY. Joy Ch. SinghaView Answer on Stackoverflow
Solution 6 - node.jsSathiaView Answer on Stackoverflow
Solution 7 - node.jsPramod DissanayakeView Answer on Stackoverflow
Solution 8 - node.jsMwizaView Answer on Stackoverflow
Solution 9 - node.jsVik2696View Answer on Stackoverflow
Solution 10 - node.jsSalman AhmedView Answer on Stackoverflow
Solution 11 - node.jsParth RavalView Answer on Stackoverflow
Solution 12 - node.jsNitin .View Answer on Stackoverflow
Solution 13 - node.jsjaleelView Answer on Stackoverflow
Solution 14 - node.jsnano devView Answer on Stackoverflow