What’s New in Angular 9 | Syncfusion Blogs
Live Chat Icon For mobile
Live Chat Icon
Popular Categories.NET  (174).NET Core  (29).NET MAUI  (207)Angular  (109)ASP.NET  (51)ASP.NET Core  (82)ASP.NET MVC  (89)Azure  (41)Black Friday Deal  (1)Blazor  (215)BoldSign  (14)DocIO  (24)Essential JS 2  (107)Essential Studio  (200)File Formats  (66)Flutter  (133)JavaScript  (221)Microsoft  (119)PDF  (81)Python  (1)React  (100)Streamlit  (1)Succinctly series  (131)Syncfusion  (915)TypeScript  (33)Uno Platform  (3)UWP  (4)Vue  (45)Webinar  (51)Windows Forms  (61)WinUI  (68)WPF  (159)Xamarin  (161)XlsIO  (36)Other CategoriesBarcode  (5)BI  (29)Bold BI  (8)Bold Reports  (2)Build conference  (8)Business intelligence  (55)Button  (4)C#  (147)Chart  (131)Cloud  (15)Company  (443)Dashboard  (8)Data Science  (3)Data Validation  (8)DataGrid  (63)Development  (628)Doc  (8)DockingManager  (1)eBook  (99)Enterprise  (22)Entity Framework  (5)Essential Tools  (14)Excel  (40)Extensions  (22)File Manager  (7)Gantt  (18)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  (507)Mobile MVC  (9)OLAP server  (1)Open source  (1)Orubase  (12)Partners  (21)PDF viewer  (43)Performance  (12)PHP  (2)PivotGrid  (4)Predictive Analytics  (6)Report Server  (3)Reporting  (10)Reporting / Back Office  (11)Rich Text Editor  (12)Road Map  (12)Scheduler  (52)Security  (3)SfDataGrid  (9)Silverlight  (21)Sneak Peek  (31)Solution Services  (4)Spreadsheet  (11)SQL  (10)Stock Chart  (1)Surface  (4)Tablets  (5)Theme  (12)Tips and Tricks  (112)UI  (387)Uncategorized  (68)Unix  (2)User interface  (68)Visual State Manager  (2)Visual Studio  (31)Visual Studio Code  (19)Web  (592)What's new  (332)Windows 8  (19)Windows App  (2)Windows Phone  (15)Windows Phone 7  (9)WinRT  (26)
Whats new in Angular 9

What’s New in Angular 9

Angular is one of the most widely used front-end frameworks, and it has recently launched a major release, version 9.0. This version of Angular uses Ivy as the compiler, which was previously under preview.

Syncfusion always keeps up with the latest releases and we are very happy to announce that Syncfusion Angular components are compatible with Angular 9. Syncfusion’s release version 17.4.51 supports Angular 9 with the Ivy compiler.

Get started with Angular 9 by installing Angular 9 packages and Syncfusion 17.4.51 Angular packages. For instance, the Syncfusion Angular Grid package (with Angular 9 support) can be installed using the following command.

npm install @syncfusion/ej2-angular-grids@17.4.51

Let’s take a look at the updates available with Angular 9.

Ivy

Angular 9 uses Ivy as the default compiler. It has undergone several bug fixes and improvements. These are discussed in the following sections.

Size of the bundles reduced

With the Ivy compiler, items that are not part of the project have been excluded via tree-shaking. So they are not bundled, resulting in a reduction in the size of files.

The reduction in file size results in a faster loading of applications.

You can see a substantial difference in the bundles in the following images that a production build generated for an Angular 8 app versus an Angular 9 app for an Angular base source.

Angular 8Bundle generation in Angular 8

Angular 9Bundle generation in Angular 9

Test runs optimized

The Angular testbed used to recompile all components regardless of any changes made to the test. With Ivy, that burden has been eliminated. It doesn’t recompile all components unless there is a change.

This results in considerable improvement in the time taken to run a test.

Global object and debugging

Angular 9 provides better debugging with the global object available from @angular/core through ng. The ng object is made available when an app runs in development mode. Components, directives, and other instance information can be accessed and states can be updated through the applyChanges function.

The functions getComponent, getContext, getDirectives, getHostElement, and getInjector are all available in the ng global object.Global Object And Debugging

Better type checking

Type checks are better handled with the Ivy compiler in Angular 9. Apart from the existing basic and fullTemplateTypeCheck, Angular 9 provides one more type check, strictTemplates. This check applies more strict type checks, like when you try to use an object that is not a part of the ngFor iteration, it throws an error.Type Checking in Angular 9

Clearer build errors

Apart from the strong type check, Ivy also shows more detailed and readable error messages than its earlier versions.Clearer build errors - Angular 9

ProvidedIn injector with new options

@Injectable now has two additional options apart from the root. When we inject a service, we will use ProvidedIn as ProvidedIn:’root’. Apart from the root, Angular 9 has two more options:

ProvidedIn:’Platform’: This makes the service available through the singleton platform injector across all applications.

ProvidedIn:’any’: This makes the service a single instance per module.

Intro of new components

Two new components have been introduced that can be installed in an application.

youtube-player

YouTube videos can now be rendered within an Angular application through the youtube-player component.

npm install @angular/youtube-player

google-maps

Google maps can now be easily integrated with Angular applications.

npm install @angular/google-maps

AngularForm changes

The ngForm tag, which was used with forms, is no longer available. It has been changed to ng-form.

TypeScript 3.7

Angular has been updated to support TypeScript version 3.6 and 3.7, which have several advantages and improvements.

How to update to Angular 9

According to Angular documentation, if you have an Angular version older than Angular 8, you need to  first update it to Angular 8, and then to 9.

Update to 8.

ng update @angular/cli@8 @angular/core@8

And then to 9.

ng update @angular/cli @angular/core

More detailed information on the update is available on the Angular website.

Conclusion

I hope you now have a clear idea about the updates available with Angular 9. Once again, we are glad to announce that Syncfusion Angular components (17.4.51) are compatible with Angular 9. Try using our Angular components in your application development to reduce your development time. You can check out our sample from this GitHub location and ask any questions in the issues section.

If you have any questions about these features, please let us know in the comments below. You can also contact us through our support forumDirect-Trac, or feedback portal. We are happy to assist you!

Tags:

Share this post:

Popular Now

Be the first to get updates

Subscribe RSS feed

Be the first to get updates

Subscribe RSS feed