Whatās new in Angular 9..?
For months now the Angular Development team had been waiting for the release for updates and new features in Angular. And finally, the wait is over as Angular 9.0.0 has been officially released. It has been a major release due to the changes to the ecosystem.
Whatās new in Angular 9?
Below are the major aspects introduced in Angular 9:
Ivy Compiler
The outstanding change is the Ivy. Ivy is the default compiler and runtime with the release of Angular 9. Ivy has some gripping features like it improves the bundle size, adds improved type checking, allows for better debugging, agile testing, by default enables AOT compiler on and improves CSS class and style binding.
Smaller Bundles and Performance
The previous Angular versions had the problem of the filesize for the created JavaScript bundles i.e. app. The framework in Angular is much larger when compared to other libraries like React and Vue.js.
Though angular runtime is great, loading can take longer, you may not feel the difference while running. Ivy helps both small and large apps to improve bundle size savings which eliminate dead code.
Changes with Angular Forms
With this new angular version, there are some modifications in the form. Previously, < ngForm > was a valid selector that will no longer be used when An Angular form is referenced. Instead the < ng-form > can be used. You can now directly use the FormsModule. Instead of FormsModule.withConfig used previously.
Need for Faster Mobile Apps
In the era of smartphones, desktops contribute a very little percentage of the website traffic. Smartphones require more āmobile-friendlyā kinds of stuff by eliminating the downloadable resources for better user experience. To help out the Angular Developers in this scenario we have the Ivy engine that speeds up the application in multiple folds and enhances application load speed by reducing the size of Javascript classes.
Angular Component Updates
The components will not be imported via @angular / material in Angular 9. It uses secondary entrance points such as @angular/material/button.
i18n Improvements
Angular being a JavaScript platform has been embraced worldwide, and Angular CLI helps you to implement basic codes that are helpful in creating converter files in order to write applications in multiple languages. The Angular team further restructured the method on Ivy to make the implementation of compile-time inline easier.
Dependency Injection Changes in Core
There is slight improvisation for dependency injections in the new version of Angular. Though not a big change but support for the providedIn value section has been added.
@Injectable({ providedIn: āplatformā }) class MyService {ā¦}
There have been an addition to the value library for the providedIn property like Platform-like scopes and any.
Features of Angular 9:
By default, Ivy is used for compilation.
The new version of TypeScript is available i.e. TypeScript 3.7.
AOT mode by default compiles the CLI apps.
Bazel: ts_library targets are supported for ng_package as entry-points.
tslib is listed as peer dependency and not as direct dependency.
ngtsc diagnostics are converted all to ts.Diagnostics.
ivy: new benchmark focusing on template creation is added.
ivy: add ngIf-like directive to the ng_template benchmark.
ivy: avoid native node retrieval from LView.
ivy: avoid repeated native node retrieval and patching.
ivy: avoid repeated tNode.initialInputs reads.
ivy: move local references into consts array, closes.
language-service: On TypeScriptHost it enable logging.
language-service: For invalid templateUrls it provides diagnostics.
language-service: For invalid styleUrls it provides diagnostics.
Some important facts about upgrading to Angular 9:
Updating to Angular 9 is automatic with ng update script if your application uses CLI:
npm install āno-save @angular/cli@^ 8.3.15
ng update @angular/cli @angular/core ānext
Update your local ā@angular/cliā to version 8.3.15 or later 8.x version before updating for a better experience.
It is mandatory to include ānext command line flag during the RC period.
It has been a long journey for the contributors! So, as of now, one journey has started, and another must begin. What will be Angular 10 like?
















