|Angular 5 - Smaller, Faster, Easier To Use|
|Written by Kay Ewbank|
|Monday, 06 November 2017|
There's a new major release of Angular that the developers claim is smaller, faster, and easier to use. New features of Angular 5, codenamed pentagonal-donut, include automatic use of the build optimizer.
In this version when you create a production build with the CLI, the build optimizer will be applied by default. The build optimizer is a tool included in the CLI for making your bundles smaller by applying semantic analysis of your Angular application. It works by first marking those parts of your application that are standard as
The second main improvement in Angular 5 is the ability to more easily share application state between the server-side and client-side versions of your application. This is achieved by two things - an Angular Universal State Transfer API, and DOM Support.
This new release adds ServerTransferStateModule, together with the corresponding BrowserTransferStateModule which enable you to generate information on the server side as part of your rendering, then transfer it to the client side to avoid having to regenerate it. The developers say this is useful in situations such as when your app needs to fetch data over HTTP. Because the state is transferred from the server, you don't have to make a second HTTP request once the application makes it to the client.
Also designed to improve sharing application state is the addition of Domino, which is a server-side DOM implementation based on Mozilla's dom.js, to the platform-server. This means Angular supports more DOM manipulations within server-side contexts, improving support for third party JS and Component libraries that aren’t server-side aware.
The compiler has been improved to support incremental compilation for faster rebuilds, and features have been added to the Decorators. The compiler now operates as a TypeScript transform as introduced as part of TypeScript 2.3, meaning Angular can hook into the standard TypeScript compilation pipeline. The developers say using this on an incremental build of Angular saves 95% of the build time.
or email your comment to: email@example.com
|Last Updated ( Monday, 06 November 2017 )|