Ivy: The Game Changer in Angular 9 | Syncfusion Blogs
Live Chat Icon For mobile
Live Chat Icon
Popular Categories.NET  (180).NET Core  (28).NET MAUI  (224)Angular  (113)ASP.NET  (49)ASP.NET Core  (81)ASP.NET MVC  (87)Azure  (41)Black Friday Deal  (1)Blazor  (234)BoldSign  (14)DocIO  (24)Essential JS 2  (110)Essential Studio  (199)File Formats  (72)Flutter  (135)JavaScript  (226)Microsoft  (121)PDF  (83)Python  (1)React  (105)Streamlit  (1)Succinctly series  (131)Syncfusion  (960)TypeScript  (33)Uno Platform  (3)UWP  (3)Vue  (46)Webinar  (53)Windows Forms  (59)WinUI  (72)WPF  (162)Xamarin  (159)XlsIO  (38)Other CategoriesBarcode  (5)BI  (29)Bold BI  (8)Bold Reports  (2)Build conference  (10)Business intelligence  (55)Button  (4)C#  (163)Chart  (145)Chart of the week  (57)Cloud  (15)Company  (440)Dashboard  (8)Data Science  (3)Data Validation  (8)DataGrid  (73)Development  (676)Doc  (7)DockingManager  (1)eBook  (99)Enterprise  (22)Entity Framework  (7)Essential Tools  (13)Excel  (43)Extensions  (23)File Manager  (7)Gantt  (20)Gauge  (12)Git  (5)Grid  (31)HTML  (13)Installer  (2)Knockout  (2)Language  (1)LINQPad  (1)Linux  (2)M-Commerce  (1)Metro Studio  (11)Mobile  (519)Mobile MVC  (9)OLAP server  (2)Open source  (1)Orubase  (12)Partners  (21)PDF viewer  (45)Performance  (13)PHP  (2)PivotGrid  (5)Predictive Analytics  (6)Report Server  (3)Reporting  (8)Reporting / Back Office  (9)Rich Text Editor  (12)Road Map  (12)Scheduler  (54)Security  (5)SfDataGrid  (9)Silverlight  (21)Sneak Peek  (32)Solution Services  (4)Spreadsheet  (11)SQL  (15)Stock Chart  (1)Surface  (4)Tablets  (5)Theme  (12)Tips and Tricks  (113)UI  (400)Uncategorized  (68)Unix  (2)User interface  (68)Visual State Manager  (2)Visual Studio  (31)Visual Studio Code  (19)Web  (624)What's new  (337)Windows 8  (19)Windows App  (2)Windows Phone  (15)Windows Phone 7  (9)WinRT  (26)
Ivy The Game Changer in Angular 9

Ivy: The Game Changer in Angular 9

Even though Angular 9 has some extraordinary updates like improved ng update, support for TypeScript, and inline rendering support for YouTube and Google Maps, the default Ivy compiler has grabbed the attention of developers worldwide with its unbeatable features.

In this blog, we’ll dive into some interesting topics about the Ivy compiler:

Ivy: The next-generation compiler

Angular 9 is available with the awesome features of Ivy, the next-generation compilation and rendering pipeline.

Ivy is the default compiler from Angular version 9 onwards. In the previous version, the View Engine was the default compiler, which produced larger bundle sizes. Ivy uses tree shaking to remove unused code in applications.

The following screenshot illustrates how Ivy improves the application bundle size in Angular 9.

Ivy size improvements
Source: Angular blog

How Ivy improves your application architecture 

Ivy improves application architecture compared to previous versions of Angular. It enhances existing applications as follows:

  • Ivy makes Angular applications simpler, smaller, and faster.
  • Reduces bundle sizes from Angular 8 by an average of 30%.
  • Accelerates application building and compilation.
  • Smarter recompilation, resulting in 40 to 50% reduction in time to compile.
  • Improved speed of internationalization (i18n).
  • Easy debugging mode.
  • Improved build times, with AOT enabled by default.
  • Faster testing.
  • Improved CSS class and style binding.
  • Improved strict type checking.
  • Improved build errors.

A whole new way to build Ivy apps 

StackBlitz is one of the most useful online code editors for deploying Angular apps. Its most recent 2020 version provides:

  • Theme support
  • Auto-import support
  • Zen mode
  • 5x faster UI bundling
  • Ivy support

The following screenshots from the official Angular site illustrate the steps to enable the Ivy compiler in StackBlitz.

Default Enable Ivy option in Settings section

  • Within the json file, you will find enableIvy set to true within angularCompilerOptions as shown in the following screenshot.

enableIvy set to true in tsconfig.json file

Stronger type checking in templates with Ivy

Stronger template and strict type checking are enabled in Angular version 8 and above. The strictTemplates option provides the strongest type checking in templates. It is like the typescript strict flag that checks the expressions and bindings within the templates of TypeScript applications.

In the following code, fullTemplateTypeCheck and strictTemplates flags in the TypeScript configuration filetsconfig.json, are set to true.

"fullTemplateTypeCheck": true,
"strictInjectionParameters": true 

Here are some reasons template checking is useful:

  • Faster debugging
  • Fewer runtime glitches
  • More meaningful tests

The phantom of the template error

Three types of template type checking are available in Ivy:

  • Basic mode
  • Full mode
  • Strict mode

Basic mode

In basic mode, the fullTemplateTypeCheck flag is set to false in the tsconfig.json file. It validates only the top-level expressions in a template just like the following one.

"angularCompilerOptions": {
    "fullTemplateTypeCheck": false,
    "strictInjectionParameters": true


   <div>{{ heroes.Id }} {{ heroes.name }}</div>
heroes: Hero = 
    { id: 10, name: "Landon" };

Here, type checking has been done only on heroes, not in the Id. Only the first term heroes is used for checking.

Full mode

In full mode, the fullTemplateTypeCheck flag is set to true, as in the following code. Angular is more aggressive in this type checking within templates. Full mode verifies all levels to check whether an object exists.

“angularCompilerOptions”: {
    “fullTemplateTypeCheck”: true,
    “strictInjectionParameters”: true


  <div>{{ heroes.Id }} {{ heroes.name }}</div>
heroes: Hero = 
    { id: 10, name: "Landon" };

Here, type checking has been done for the entire hero.Id. The following screenshot shows an error in the template of the component AppComponent as the property Id does not exist in it.

Error showing property Id is not existing

Strict mode

In strict mode, the fullTemplateTypeCheck flag is set to true. Strict mode is a superset of full mode and can be accessed by setting the strictTemplates flag to true like in the following code.

"angularCompilerOptions": {
  "fullTemplateTypeCheck": true,
   "strictInjectionParameters": true,
    "strictTemplates": true


 <li *ngFor="let hero of heroes; trackBy: trackByHero">
  <div>{{ hero.Id }} {{ hero.name }}</div>
  heroes: Hero[] = [
    { id: 10, name: "Landon" },
    { id: 20, name: "Ella" },
    { id: 30, name: "Madelyn" },
    { id: 40, name: "Haley" }
  trackByHero(hero: Hero) { return hero.id; }      

While compiling the template, you will see the template type checking. As shown in the following screenshot, the error appears when you compile the template.
Error appears during template compilation

Improved CSS class and style binding

In Angular version 9, within the HTML template itself, you will be able to use style variables like in the following code example.


<!--Class Binding -->
<div [class.myclass]="applyclass">Apply Class</div><br>

<!-- Style Binding -->
<div [style.color]="applystyle? 'blue':'orange'">Style binding</div>`

  public tittle1="This is Class Binding";
  public applyclass= true;

    public tittle2="This is Style Binding";
   public applystyle= true;

Note: Strict mode helps to reduce runtime errors by 15%.


In this blog, we have discussed some important features and concepts of the Ivy compiler in Angular version 9 and have seen how it differs from the previous version of the Angular framework.

For Angular developers, Syncfusion provides over 65+ high-performance, lightweight, modular, and responsive Angular components to speed up your development.

If you are already a customer, you can download our Angular package from the License and Downloads page. If you are not yet a customer, you can try our 30-day free trial to check out all our Angular components have to offer. You can also explore samples in our GitHub repository and ask any questions in the issues section.

Please share your feedback in the comments section below. If you have any questions about Syncfusion Angular products, you can contact us through our support forumDirect-Trac, or feedback portal. We are always happy to assist you!


Share this post:

Popular Now

Be the first to get updates

Subscribe RSS feed

Be the first to get updates

Subscribe RSS feed