The initial release of Angular (AngularJS) was on October 20, 2010, and the first stable version was released in June 2012. On 14th September 2016, Angular 2 was released. Later, on 23rd March 2017, Angular 4 was released and which was backward compatible with Angular 2. It was an improvement over Angular 2 which was not backward compatible with its predecessor, AngularJS.
The latest version of Angular, Angular 5 was announced to the users on 1st November 2017. Angular 5 is focused on making the Angular applications smaller, faster and easier to use. The Google Angular team has built a nifty tool to make upgrading from previous versions as simple as possible.
The Angular 5 comes with default Build Optimizer during production build. The build optimizer optimizes the code by removing unwanted code segment including Angular decorators which aren’t needed at runtime. It also provides an option to select code as ‘pure’, thus the tree shaking is made easier.
The improved Angular 5 compiler supports incremental compilation. This provides for faster rebuilds for both production builds and builds with AOT. In earlier versions the white spaces in the templates was recreated in build code now there is option to choose whether to include these white spaces
Angular 5 support new decorators like useValue, useFactory and data in object literals, which helps use the values that are generated during runtime. The developers can now use a lambda instead of a named function, thus they can execute code without affecting their public API.
The need for i18n polyfills in applications for internationalization of number, date, time can be eliminated, as Angular 5 comes with build in feature to standardize these across browsers. If the developers prefer the old behavior they can import DeprecatedI18NPipesModule.
Angular 5 support new events like GuardsCheckStart, ChildActivationStart, ActivationStart, GuardsCheckEnd, ResolveStart, ResolveEnd, ActivationEnd, ChildActivationEnd. These events can be used to do things like showing a spinner on any router outlet when a child element is updating. If the developers need to reload a page, when it receives a request to navigate to the same URL it can be configured using a router.
In Angular 5 the validity or value of form or field can be updated using on blur or on submit, no need to track every input event. Developers can add ‘asyncValidators’ directly into options objects, rather than specifying them as the third parameter.
Angular 5 is included with two transition aliases :increment and :decrement.
The Angular 5 animation queries now support negative value limits.