How can I check which version of Angular I'm using?

前端 未结 28 1159
死守一世寂寞
死守一世寂寞 2020-11-28 18:23

How can I tell which version of Angular I am using?

I have tried:

angular --version
angular --v
angular -version
angular -v

but get

相关标签:
28条回答
  • 2020-11-28 19:01

    Just Run ng v in command

    You will get result like

    Angular CLI: 7.3.9
    Node: 12.11.0
    OS: win32 x64
    Angular: 7.2.15
    ... common, compiler, compiler-cli, core, f
    ... language-service, platform-browser, pla
    ... router
    
    Package                           Version
    -------------------------------------------
    @angular-devkit/architect         0.13.9
    @angular-devkit/build-angular     0.13.9
    @angular-devkit/build-optimizer   0.13.9
    @angular-devkit/build-webpack     0.13.9
    @angular-devkit/core              7.3.9
    @angular-devkit/schematics        7.3.9
    @angular/cli                      7.3.9
    @ngtools/webpack                  7.3.9
    @schematics/angular               8.0.0
    @schematics/update                0.13.9
    rxjs                              6.5.3
    typescript                        3.1.6
    webpack                           4.29.0
    
    0 讨论(0)
  • 2020-11-28 19:02

    Attention: The following only checks the Angular-CLI version!!!:

    Both commands work:

    ng -v
    

    or

    ng v
    

    0 讨论(0)
  • 2020-11-28 19:02

    There are multiple ways:

    1. You may verify it from your package.json file
    2. You use the following command:

    ng --version

    The command above will result in the following output:

    Angular CLI: 7.0.3

    Node: 9.4.0

    OS: darwin x64

    Angular: 7.0.1

    ... animations, common, compiler, compiler-cli, core, forms

    ... http, language-service, platform-browser

    ... platform-browser-dynamic, router

    Package Version


    @angular-devkit/architect 0.10.3

    @angular-devkit/build-angular 0.10.3

    @angular-devkit/build-optimizer 0.10.3

    @angular-devkit/build-webpack 0.10.3

    @angular-devkit/core 7.0.3

    @angular-devkit/schematics 7.0.3

    @angular/cli 7.0.3

    @ngtools/webpack 7.0.3

    @schematics/angular 7.0.3

    @schematics/update 0.10.3

    rxjs 6.3.3

    typescript 3.1.4

    webpack 4.19.1

    So, the version of Angular, Angular CLI, Node and many other packages can be verified from here.

    0 讨论(0)
  • 2020-11-28 19:03

    For Angular 2+, in any modern browser having developper tools (F12) you can inspect the top level application tag.

    For Internet Explorer 11 or Edge you can find information here :

    Works for Angular 2+ Chrome browser

    Firefox firebug

    0 讨论(0)
  • 2020-11-28 19:03

    For angular 4+ use,

    • ng version
    • ng v

    Please note ng -v option does not work in Angular 7+.

    0 讨论(0)
  • 2020-11-28 19:05

    version after angular 2 you can use from terminal,

    ng -v
    
    
    
        _                      _                 ____ _     ___
       / \   _ __   __ _ _   _| | __ _ _ __     / ___| |   |_ _|
      / △ \ | '_ \ / _` | | | | |/ _` | '__|   | |   | |    | |
     / ___ \| | | | (_| | |_| | | (_| | |      | |___| |___ | |
    /_/   \_\_| |_|\__, |\__,_|_|\__,_|_|       \____|_____|___|
                   |___/
    
    Angular CLI: 1.7.3
    Node: 9.3.0
    OS: linux x64
    Angular: 5.2.9
    ... animations, common, compiler, compiler-cli, core, forms
    ... http, language-service, platform-browser
    ... platform-browser-dynamic, router
    
    @angular/cli: 1.7.3
    @angular-devkit/build-optimizer: 0.3.2
    @angular-devkit/core: 0.3.2
    @angular-devkit/schematics: 0.3.2
    @ngtools/json-schema: 1.2.0
    @ngtools/webpack: 1.10.2
    @schematics/angular: 0.3.2
    @schematics/package-update: 0.3.2
    typescript: 2.5.3
    webpack: 3.11.0
    mohideen@root:~/apps/UI$ 
    
    0 讨论(0)
提交回复
热议问题