How can I tell which version of Angular I am using?
I have tried:
angular --version
angular --v
angular -version
angular -v
but get
There are many way, you check angular version Just pent the comand prompt(for windows) and type
1. ng version
2. ng v
3. ng -v
4. You can pakage.json file
5.You can check in browser by presing F12 then goto elements tab
Full understanding of subversion about(x.x.x) please see angular documentation angularJS and angular 2+
you can just type ng version
thats it
You could also check your package.json:
"dependencies": {
"@angular/common": "^5.0.0",
"@angular/compiler": "^5.0.0",
"@angular/core": "^5.0.0",
"@angular/forms": "^5.0.0",
"@angular/http": "^5.0.0",
"@angular/platform-browser": "^5.0.0",
"@angular/platform-browser-dynamic": "^5.0.0",
"@angular/router": "^5.0.0",
}
(The caret ^
will update you to the most recent major version (the first number).
^4.3.0
will match any 4.x.x
release including 4.4.0
, but will hold off on 5.0.0
.
The tilde ~
matches the most recent minor version (the middle number).
~4.3.0
will match all 4.3.x
versions, but will miss 4.4.0
.)
You can also check it by inspecting the elements on the page:
press F12 to open Browser's developer tools.
Inspect an Element.
Expand Body
You will see the version of Angular, like the following:
ng-version="4.3.6"
On your project folder, open the command terminal and type
ng -v
it will give you a list of items, in that you will be able to see the angular version. See the screenshot.
In the browser's developer console (press F12 to open it), you can type the following,
angular.version.full
it will give you the full version, e.g. (depending on your current version). [It actually gets the full
property of angular.version
object.]
"1.4.3"
So, to see the full object, if you type
angular.version
It will give you the full version object containing version information like full, major, minor and also the codeName, e.g.
Object {full: "1.4.3", major: 1, minor: 4, dot: 3, codeName: "foam-acceleration"}