How to check or find the angular version in my project?

Dung Do Tien Nov 05 2020 768

I just study angular. I created a project by using the command ng new my-first-app. Now I want to check the angular version of this project and where is stored it?

Have 1 answer(s) found.
  • M

    Marry Christ Nov 08 2020

    You have some way to check your project version in Angular

    1. Using ng version

    Open CMD and select the root folder containing your project and type ng version. You can see the result as below:

     _                      _                 ____ _     ___
        / \   _ __   __ _ _   _| | __ _ _ __     / ___| |   |_ _|
       / △ \ | '_ \ / _` | | | | |/ _` | '__|   | |   | |    | |
      / ___ \| | | | (_| | |_| | | (_| | |      | |___| |___ | |
     /_/   \_\_| |_|\__, |\__,_|_|\__,_|_|       \____|_____|___|
                    |___/
    
    Angular CLI: 9.1.12
    Node: 12.18.3
    OS: win32 x64
    
    Angular: 9.1.12
    ... animations, cli, common, compiler, compiler-cli, core, forms
    ... language-service, platform-browser, platform-browser-dynamic
    ... router
    Ivy Workspace: Yes
    
    Package                           Version
    -----------------------------------------------------------
    @angular-devkit/architect         0.901.12
    @angular-devkit/build-angular     0.901.12
    @angular-devkit/build-optimizer   0.901.12
    @angular-devkit/build-webpack     0.901.12
    @angular-devkit/core              9.1.12
    @angular-devkit/schematics        9.1.12
    @ngtools/webpack                  9.1.12
    @schematics/angular               9.1.12
    @schematics/update                0.901.12
    rxjs                              6.6.3
    typescript                        3.7.5
    webpack                           4.42.0 

    2. See the angular project version from package.json file.

    At the root of your project, you will see the package.json file, open this file and find @angular/cli and some other packages such as forms, common, animations....

    "@angular/animations": "^9.1.1",
    "@angular/common": "^9.1.1",
    "@angular/compiler": "^9.1.1",
    "@angular/core": "^9.1.1",
    "@angular/forms": "^9.1.1",
    
    "@angular/cli": "^9.1.12"

    3. Using code to log version of the project.

    import { VERSION } from '@angular/core';
    
    console.log(VERSION.full);  
Leave An Answer
* NOTE: You need Login before leave an answer

* Type maximum 2000 characters.

* All comments have to wait approved before display.

* Please polite comment and respect questions and answers of others.

Popular Tips

X Close