Tuesday, October 2, 2018

What's new in Angular 4

Angular 4 was released in March 2017, version 3 was skipped due to internal issues with router packages. Angular 4 introduced Ahead of Time AoT compilation of templates, through which the templates a compiled at build time and converted to JavaScript.

AoT compilation has 2 advantages, compilation happens in the server during the build process, hence the client/browser has less load, also by compiling at build time we can capture errors in templates beforehand instead of breaking in the browser at run-time. Angular team also improved the View Engine, which helped in producing less code when you use the Ahead of Time compilation.
Angular 4 introduced a new package for animation - @angular/platform-browser/animations.
Angular 4 introduced some improvements to ngIf, ngFor directives, provides a new titlecase pipe, simplified http request format, improvements to Router and internationalization etc.

Angular v4.3 introduced the HttpClient in @angular/common/http which offers a simplified client HTTP API for Angular applications, this new module provides benefits like typed request and response objects, request and response interception, Observable apis, and streamlined error handling.

No comments:

Post a Comment