I have setup the angular code on my local machine. I need to know the version of the angular that I am using in the project. how can I easily find it in cmd prompt?
Go to your folder path in cmd where your angular is installed and type ng --version it will show your angular version.
You can try this out in your own application. Open your command line in the directory containing your application's package. json folder and execute npm run ng serve. You can also experiment by running ng -v then npm run ng -v which will run the version of your global and local Angular-CLIs.
There are several ways you can do that:
node_modules/@angular/core/package.json
and check version
field.If you need to use it in your code, you can import it from the @angular/core
:
import { VERSION } from '@angular/core';
Inspect the rendered DOM - Angular adds the version to the main component element:
<my-app ng-version="4.1.3">
try this command :
ng --version
It prints out Angular, Angular CLI, Node, Typescript versions etc.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With