INFO

Angular Ivy

Who or what is Ivy

Ivy is an Angular compiler added as a tested to Angular 8.0.0. It has been tested and officially added to Angular 9.0.0 as a fully working default solution.

What does it do

Since 8.0.0 you are able to switch to using Ivy but this has been added as an ability to gain some new features in the future. Currently switching to this option shouldn’t change a thing in your application. The Angular team state that they wanted to keep all the features compatible with the new compiler without providing any changes. This way they will be able to gather feedback from users before going to further updates.

Turning it on

As mentioned above turning the Ivy on doesn’t change anything in Angular 8.0 and Angular 9.0 but the creators are really keen on getting all the reviews.

To enable the option you need to use "enableIvy": true in your angularCompilerOptions.

Goals for future

Creators say that this is a big step for Angular and we can compare it to the ‘Fiber rewrite’ from React. As the Ninja Squad say

  • 🚀reach better build times (with a more incremental compilation)
  • 🔥reach better build sizes (with a generated code more compatible with tree-shaking)
  • 🔓unlock new potential features (metaprogramming or higher order components, lazy loading of component instead of modules, a new change detection system not based on zone.js…)

You may also like...