Facilitating the Spread of Knowledge and Innovation in Professional Software Development

Write for InfoQ


Choose your language

InfoQ Homepage News Angular 5 Comes with Faster Incremental Compilation

Angular 5 Comes with Faster Incremental Compilation

Leia em Português

This item in japanese

Lire ce contenu en français


Google has pushed Angular 5 out, adding build optimizations, incremental compilation, and better support for internationalization, amongst others.

Angular 5 is a new major version of the popular web framework backed by Google. From the dozens of new features and performance improvements we have selected to detail a few that seem to have more impact on development work.

Build Optimization. CLI 1.5 will generate v5 projects with build optimization turned on by default, generating smaller bundles. Some parts of the application will be marked as pure helping in tree shaking when removing the parts that are not needed. Also, the Angular decorators are removed from runtime code, making the code smaller and faster to boot.

Compiler. The Angular compiler supports incremental builds, managing to reduce the build time by 90% in tests on real projects by using Typescript transforms. Because the compilation time has decreased under 2 seconds for large projects, AOT will be turned on by default in a future version of the CLI.

Universal State Transfer. Angular 5 has has added ServerTransferStateModule and BrowserTransferStateModule to transfer the state computed during server-side rendering to the client so it would not have to be generated again.

Domino. Angular now supports Domino, a server-side DOM implementation, adding support for more component JavaScript libraries to the server side.

Whitespace. Developers can choose to preserve or not component whitespace specifying the option in the decorator or at the application level in tsconfig.json.

Internationalization. Angular 5 has new pipes for date, number and currency for better internationalization support across browsers, removing the need for corresponding polyfills. More details on how to use the I18n pipes and how to revert to the old mechanism can be found here.

The latest Angular introduces some breaking changes, but nothing problematic like switching from Angular 1.x to 2. One of them is the dependence on TypeScript 2.4.x. Also, some code sections have been deprecated. For the entire list of changes we recommend reading the Release Notes.

Rate this Article


Hello stranger!

You need to Register an InfoQ account or or login to post comments. But there's so much more behind being registered.

Get the most out of the InfoQ experience.

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Community comments

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p