In this article, We will learn about different ways to find the angular version used in an application.
You must have encountered a situation where you want to find what angular version is used in your application. There are many different ways for this so let’s see all those one by one.
- Browser’s developer tool bar:
- Open your application in a browser and then go to the ‘Elements’ tab and search for ‘ng-version’.
- Open your application in a browser and then go to the ‘Elements’ tab and search for ‘ng-version’.
- Command line:
- Open your terminal/command line and go to the directory where your angular application code is present.
- And then execute ‘
ng --version
‘ or ‘ng version
‘ or ‘ng v
‘ command to get the angular version used in your application. - You can also run ‘
npm list --depth 0
‘ from your application folder to get all the packages installed. - You can find there angular version In the list of installed packages as highlighted in below screen.
- Application code:
- Import VERSION package in your code and then use it to get the angular version used in your application.
- Import VERSION package in your code and then use it to get the angular version used in your application.
- package.json: file
- Open the package.json file in your application root folder and look for the version of @angular/core.
- Open the package.json file in your application’s node_modules/@angular/core/package.json and look for ‘version’.
- Open the package.json file in your application root folder and look for the version of @angular/core.
References
- https://www.tektutorialshub.com/angular/how-to-check-angular-cli-version
- https://www.py4u.net/discuss/291208
- https://w3codemasters.in/how-to-check-angular-version-in-cmd
- https://stackoverflow.com/questions/46332383/how-to-get-the-angular-version
I hope you like this article and helps you to solve your problems.
Visit Techtalkbook to find more related topics.