Introduction to AngularJS Versions
What Is the Difference between AngularJs and Angular?
The difference between AngularJs and Angular are as below:
- For data binding, variables are created and used with their scope. Scope variables are visible in view as well as the controller.
- There is another concept called RootScope. RootScope variables are visible throughout the application.
- New attributes are added to HTML tags using Angular directives for data binding.
- For example, the ng-model directive is used to store HTML field value to a variable and the ng-bind directive is used to set AngularJS variable value to the HTML field.
- Since version 2, AngularJS is called Angular (Angular 2, Angular 4 etc.).
- Unlike AngularJS, Angular uses the hierarchy of components (modules).
- There is at least a root component and other components for application features.
- For each component, there is a class to define data and logic and there is an HTML template that defines a view to be displayed.
How to check the Angular version on your system?
- You can check it with the command: ‘ng version’
How to update to the latest version of Angular?
- You can use this command: ‘ng update’
The angular version contains three parts in it: Major version, minor version, and patch release. For example: In Angular version 5.2.3,
5 – is a major release
2 – is minor release and
3 – is patch release.
1. Major Release
With the major releases, significant new features are added. To update your application from the older version to new version, you need to learn new APIs and update code/scripts accordingly. So, developer assistance is needed. Major releases are released once per six months.
2, Minor Release
With the minor release, small new features are added. Minor releases are backward compatible so that the developer does not need to update the code according to new APIs, but he/she can learn new APIs and update the code optionally. Peer dependencies are updated but not compulsory to be updated in applications. Two to three minor releases are released per major release.
3. Patch Release
These releases are for bug fixes. The developer does not need to worry about it. A patch is released almost per week.
How to Update the Application to Target Release?
- If you want to jump minor release/es, for example from 5.1.5 to 5.3.6, you can do it directly without worrying about minor releases or patches in between.
- But if you want to jump major releases, for example, 3.2.1 to 5.3.2, you should go step by step and test and validate at each update. That is, migrate from 3.x.x to 4.x.x and then 4.x.x to 5.x.x.
- If you are updating from AngularJS to Angular, you can use this guide: https://angular.io/guide/upgrade.
- If you are updating from Angular 2 onwards, you can use this guide: https://update.angular.io/
How Angular Releases are Supported?
- Each major release is supported for 18 months in total out of which active support is for 6 months. During these 6 months, scheduled updates and patches are released.
- After active support, long term support (LTS) for 12 months is provided. In these 12 months, only critical fixes and security patches are released.
What have Currently Supported Versions?
- 0.0: Its active major release currently, released on May 28, 2019, active till Nov 28, 2019, and long term supported till Nov 28, 2020.
- 0.0: It’s under long term support currently, released on Oct 18, 2018, active support ended on Apr 18, 2019, and long term supported till Apr 18, 2020.
- 0.0: It is under long term support currently, released on May 3, 2018, active support ended on Nov 3, 2018, and long term supported till Nov 3, 2019.
- Releases 4.0.0 and 5.0.0 are no longer supported.
How Angular APIs are Deprecated?
APIs in Angular is deprecated in a very smooth way so that users have time to update their applications.
- Deprecation is announced in the changelog: https://github.com/angular/ angular/blob/master/CHANGELOG.md.
- Then documentation https://angular.io/api?status=deprecated is updated to specify the deprecated APIs with a strikethrough.
- Also, https://angular.io/guide/deprecations specifies deprecated APIs and features.
- Deprecation can be announced in any release.
- Deprecated APIs are not removed from Angular immediately. They are kept in the next two major releases from the release it is announced in and then removed in the next major release.
- Deprecated APIs are under long term support (LTS) until they are removed.
- Dependencies must be updated on major releases while it is optional with a minor release.
Can I See What is Coming up Next?
Yes, we can check what all features and APIs are coming up next by using beta releases and release candidates (RC) for each major and minor release.
- Beta: These are the releases under development and testing. The version number is appended with the ‘beta’ keyword for these releases. Forex: 5.2.2-beta.0.
- A release candidate (RC): Development for these releases are completed and they are in final testing. The version number is appended with the ‘RC’ keyword for these releases. Forex: 6.1.3-RC.
AngularJS/Angular is a powerful framework for web development. But the question is what to choose? Angular or AngularJS. Obviously, Angular? as it is the latest one? Yes, that’s true. Angular is preferable in most cases. But if you want your application to run on older browsers like IE8, AngularJS can be preferred.
This is a guide to AngularJS Versions. Here we discuss the introduction and the difference between AngularJs and Angular along with Angular Versioning which includes Major Release, Minor Release, and Patch Release. You can also go through our other suggested articles to learn more