Angular Cheat Sheet
As we Know Angular team releases its major update with new version on every six month .For angular developer its hard to remember which version has what feature, specially while going for interview .
Don’t worry this blog will summarise all the versions, you just need to have a look at once before going for interview.
The rewrite of AngularJS was called “Angular 2”, but this led to confusion among developers. To clarify, the Team announced that separate terms should be used for each framework with “AngularJS” referring to the 1.X versions and “Angular” without the “JS” referring to versions 2 and up.From 2016 to 2020 angular has updated so many features with different version(2.0.0– 10.1.0).
before moving ahead let’s look into brief of angular versioning -
Angular version numbers indicate the level of changes that are introduced by the release. This use of semantic versioning helps you understand the potential impact of updating to a new version.
Angular version numbers have three parts: major.minor.patch
. For example, version 9.1.10 indicates major version 9, minor version 1, and patch level 10.
The version number is incremented based on the level of change included in the release.
- Major releases contain significant new features, some but minimal developer assistance is expected during the update. When updating to a new major release, you may need to run update scripts, refactor code, run additional tests, and learn new APIs.
- Minor releases contain new smaller features. Minor releases are fully backward-compatible; no developer assistance is expected during update, but you can optionally modify your apps and libraries to begin using new APIs, features, and capabilities that were added in the release. We update peer dependencies in minor versions by expanding the supported versions, but we do not require projects to update these dependencies.
- Patch releases are low risk, bug fix releases. No developer assistance is expected during update.
Lets get to know all versions details one by one with release date -:
Version 2(September 14, 2016) :-Angular 2 is not an upgrade of Angular 1 but it is completely rewritten Angular uses TypeScript which is a superset of JavaScript.
- Controllers are gone in Angular v2. We can say that Controllers are replaced with “Components” .
- Structural directives syntax is changed. ng-repeat is replaced with *ngFor.
- Dependency Injection, In Angular 2, DI is there but now there is a different way to inject dependencies. As everything is a class in Angular, so DI is achieved via a constructor.
- Class is the only way to define a service unlike defining with five diffrent way Factory,Service,Provider,Constant and Values.
Version 4(March 23, 2017) :- Angular 4 was announced, skipping 3 to avoid a confusion due to the misalignment of the router package’s version which was already distributed as v3. 3.0. Angular 4 is backward compatible with Angular 2.
- Introducing HttpClient, a smaller, easier to use, and more powerful library. for making HTTP Requests.
- New router life cycle events for Guards and Resolvers. Four new events: GuardsCheckStart, GuardsCheckEnd, ResolveStart, ResolveEnd join the existing set of life cycle event such as NavigationStart.
- Conditionally disable animations.
Version 5(November 1, 2017) :-Angular 5 include support for progressive web apps, a build optimizer and improvements related to Material Design.
- Added BrowserTransferModule and ServerTransferStateModule. These modules enable you to transfer information between the server and client-side versions of the application. so that regeneration of the same information is dodged. This is helpful for developers when their application fetches data over HTTP. This means there is no need to make another HTTP request once the application reached client-side.
- HttpClient , the precious @angular/http library replace the HttpModule with HttpClientModule from @angular/common/http, inject the HttpClient service, and remove the map(res => rex.json()) calls that is no longer required.
Version 6(May 4th, 2018) :-Angular 6 include the Angular Command Line Interface (CLI), The Component Development KIT (CDK) and the Angular Material package update.
- This is a major release focused less on the underlying framework, and more on the toolchain and on making it easier to move quickly with Angular in the future, like: ng update, ng add, Angular Elements, Angular Material + CDK Components, Angular Material Starter Components, CLI Workspaces, Library Support, Tree Shakable Providers, Animations Performance Improvements, and RxJS v6.
Version 7( October 18, 2018) :-Updates regarding Application Performance, Angular Material & CDK .
Virtual Scrolling, Improved Accessibility of Selects, now supports Content Projection using web standard for custom elements, and dependency updates regarding Typescript 3.1, RxJS 6.3, Node 10 (still supporting Node 8).
Version 8(May 28th, 2019) :-Featuring Differential loading for all application code, Dynamic imports for lazy routes, Web workers, TypeScript 3.4 support, and Angular Ivy as an opt-in preview. Angular Ivy opt-in preview includes -
- Generated code that is easier to read and debug at runtime
- Faster re-build time
- Improved payload size
- Improved template type checking
- Backwards compatibility
Version 9(February 6, 2020):-Angular 9 was released on February 6, 2020. Version 9 moves all applications to use the Ivy compiler and runtime by default. Angular has been updated to work with TypeScript 3.6 and 3.7. In addition to hundreds of bug fixes, the Ivy compiler and runtime offers numerous advantages -
- Smaller bundle sizes
- Faster testing
- Better debugging
- Improved CSS class and style binding
- Improved type checking
- Improved build errors
- Improved build times, enabling AOT on by default
- Improved Internationalization.
Version 10(June 24, 2020):- A planned upgrade to the popular web development framework, is now in progress, with two initial beta releases of the TypeScript-based platform arriving on April 8, followed by a third beta April 15 Added some more features as follows -
- New Date Range Picker (Material UI library)
- Warnings about CommonJS imports
- Optional Stricter Settings
- Keeping Up to Date with the Ecosystem
- New Default Browser Configuration
- Deprecations and Removals.
That’s all about till now updates In general, you can expect the following release cycle from angular teams
- A major release every 6 months
- 1–3 minor releases for each major release
- A patch release and pre-release (
next
orrc
) build almost every week.
NOTE-:
All of our major releases are supported for 18 months.
6 months of active support, during which regularly-scheduled updates and patches are released.12 months of long-term support (LTS), during which only critical fixes and security patches are released.
Angular versions ^4.0.0, ^5.0.0, ^6.0.0 and ^7.0.0 are no longer under support.
I hope it will help you while going for angular interview If you liked this article, hit that clap button below 👏. and share so others can find it as well !, Also feel free to leave a comment below.
Thanks for reading………