What’s new in Angular 9?

Google has finally released the latest one more stable version of angular, i.e. Angular 9. This is one of the biggest updates they have made in the past few years. This release mainly focused on Ivy compiler and run time by default.
Before proceeding, If you want to check the Angular version installed in your laptop/computer.

Table of Contents

Open command prompt and type ng –version and press enter. You can see the version installed in your PC. (List of Angular CLI Commands)

In this blog, we will see what are the major changes that have been introduced in Angular 9.

Below are new breaking changes in Angular 9 version –

  • Angular now compiles with Ivy by default.
  • CLI apps compile in AOT mode by default (which includes template type-checking). Users who only built with JIT before may see new type errors.
  • Typescript 3.4 and 3.5 are no longer supported. Please update to Typescript 3.7.
Read:- Angular Interview Questions 

One of the major and interesting feature that everyone is talking about and that is Ivy compiler.
Let’s discuss Ivy.

Ivy:

Ivy is the default compiler and run time. Version 9 of Angular allows all the applications to use the Ivy compiler and run time.
The main strength of the Ivy is that it significantly reduces the size of applications, regardless of the application size and improvise the debugging as well.

Earlier Angular used View Engine to convert Angular code into Java Script Code.

In previous version i.e. in Angular 8, developer can enable Ivy by adding below line in tsconfig.json file.

“angularCompilerOptions”: { “enableIvy”: true }

But, In version 9, Ivy is the default compiler for your code. In case of any compatibility issue, you can choose to opt out of Ivy and continue using the previous compiler, View Engine.

To do this, open tsconfig.json file.
The value of the enableIvy flag is set to true by default, as of version 9.
You can change the value to false.

“angularCompilerOptions”: { “enableIvy”: false }

So smaller bundle and better performance due to Ivy.

Hope you like this blog on Angular 9.
Please share the link on social media.

You may like other blogs –

Interview Questions and Answers Series –

MVC Interview Questions and Answers
Web API interview questions and answers

Leave a Comment

RSS
YouTube
YouTube
Instagram