To create an Angular project in our local system, we use Angular CLI. The best way to create a boilerplate that helps us run with an Angular project. Checking the Angular version of your project is very easy. Let me show you how to do that.
How to check the Angular version
To check an Angular version, go inside the recently created Angular project and type the ng version command.
ng version
Output
_ _ ____ _ ___ / \ _ __ __ _ _ _| | __ _ _ __ / ___| | |_ _| / △ \ | '_ \ / _` | | | | |/ _` | '__| | | | | | | / ___ \| | | | (_| | |_| | | (_| | | | |___| |___ | | /_/ \_\_| |_|\__, |\__,_|_|\__,_|_| \____|_____|___| |___/ Angular CLI: 10.0.1 Node: 14.4.0 OS: darwin x64 Angular: 10.0.2 ... animations, common, compiler, compiler-cli, core, forms ... platform-browser, platform-browser-dynamic, router Ivy Workspace: Yes Package Version ----------------------------------------------------------- @angular-devkit/architect 0.1000.1 @angular-devkit/build-angular 0.1000.1 @angular-devkit/build-optimizer 0.1000.1 @angular-devkit/build-webpack 0.1000.1 @angular-devkit/core 10.0.1 @angular-devkit/schematics 10.0.1 @angular/cli 10.0.1 @ngtools/webpack 10.0.1 @schematics/angular 10.0.1 @schematics/update 0.1000.1 rxjs 6.5.5 typescript 3.9.6 webpack 4.43.0
The ng version outputs the Angular CLI version.
You can see that I am using Angular 10.0.2, and my Angular CLI version is 10.0.1.
Besides that, we can see all the library’s versions shipped with Angular and rxjs, typescript, and webpack.
You can also check the version of Angular CLI without going into the project folder, but in that instance, sometimes, the Angular version is undefined or empty.
Let’s say I am in my root folder of the system and hit the ng version command, and then I will get the following output.
If you have already created an angular project or an old one using Angular CLI, go inside that folder and type the ng version command.
So, if you want to check the version of Angular CLI, you don’t need to go inside any Angular project, but if you’re going to check the version of Angular, you should go inside that project folder and then type the command. It will give you some extra information about other package versions as well.
You can also type the ng –version command to check the Angular or Angular CLI version.
Two ways to check the Angular Version ProjectWise
- Open the Terminal inside your project and type ng —version. This will list the versions of several Angular packages installed in your project for recent Angular versions.
- Open the package.json file and examine the Angular packages referenced in your project.
Angular versioning
Angular version numbers designate the level of changes introduced by the release. This use of semantic versioning supports you in understanding the potential significance of updating to a new version.
Angular version numbers have three parts: major.minor.patch
.
For example, version 10.3.9 indicates major version 10, minor version 3, and patch level 9.
The version number is incremented based on the level of modification included in the release.
- Major releases contain important new features, but minimal developer support is expected during an update. When updating the latest major release, you may need to run the commands like update scripts, refactor code, run additional tests, and learn new APIs.
- Minor releases include the new smaller features. Minor releases are fully backward-compatible; no developer assistance is required during the updates, but you can optionally change your apps and libraries to begin using new APIs, features, and abilities added. We update peer dependencies in minor versions by extending the supported versions, but we do not require projects to update those dependencies.
- Patch releases are low-risk, bug-fix releases. Therefore, no developer assistance is required during the update.
New Angular Version release frequency
In general, you can assume the following release cycle:
- A major release every six months.
- 1-3 minor releases for each major release.
- A patch release and pre-release (next or rc) build almost every week.
All of our major releases are supported for 18 months.
- 6 months of active support, during which the core team releases regularly scheduled updates and patches.
- 12 months of long-term support (LTS), during which the angular core team of developers releases only critical fixes and security patches.
The following table shows the status of Angular versions under support.
VERSION | STATUS | RELEASED | ACTIVE ENDS | LTS ENDS |
---|---|---|---|---|
^10.0.0 | Active | Jun 24, 2020 | Dec 24, 2020 | Dec 24, 2021 |
^9.0.0 | Active | Feb 06, 2020 | Aug 06, 2020 | Aug 06, 2021 |
^8.0.0 | LTS | May 28, 2019 | Nov 28, 2019 | Nov 28, 2020 |
Angular versions ^4.0.0, ^5.0.0, ^6.0.0 and ^7.0.0 are no longer under support.
That is it for checking the Angular version.