How can I tell which version of Angular I am using?
I have tried:
angular --version
angular --v
angular -version
angular -v
but get
Same like above answer, you can check in browser by inspecting element, if it is AngularJS we can see something like below.
The ng-app directive tells AngularJS that this is the root element of the AngularJS application.
All AngularJS applications must have a root element.
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)
- ng version or ng --version (Find the image for the reference)
- ng v
- ng -v
In the terminal you can find the angular version as shown in the attached image :
- 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 :
- Find the package.json file, You will find all the installed dependencies and their version.
It will be Here..
../project_name/bower_components/angular/angular.js
/**
* @license AngularJS v1.0.6
* (c) 2010-2012 Google, Inc. http://angularjs.org
* License: MIT
*/
Now it is ng -v
If you are useing angular cli then you can check useing
ng --version
Now it is ng -v
Or you can also check in
pakage.json file
"dependencies": {
"@angular/animations": "^4.0.0",
"@angular/common": "^4.0.0",
"@angular/compiler": "^4.0.0",
"@angular/core": "^4.0.0",
"@angular/forms": "^4.0.0",
"@angular/http": "^4.0.0",
"@angular/platform-browser": "^4.0.0",
"@angular/platform-browser-dynamic": "^4.0.0",
"@angular/router": "^4.0.0",
"angular-in-memory-web-api": "^0.3.2",
"core-js": "^2.4.1",
"rxjs": "^5.1.0",
"zone.js": "^0.8.4"
},