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

前端 未结 28 1286
死守一世寂寞
死守一世寂寞 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:06

    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 :

    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 :

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

提交回复
热议问题