Angular 9 New Features

Version 9 of Angular has been released this month on 7th, Most of the feature s are related to the framework not to the developers.
In Angular Version 9 having below listed features.
1. Ivy Compiler
Version 9, Angular Ivy is the default rendering engine. Earlier versions have used View Engine It has produced large bundles.
- Smaller bundle sizes:
The Ivy has used tree-shaking to remove unused code in application generated less code.
The below snapshot shows, apps of all sizes can benefit from the Ivy compiler.
apart from Smaller bundle sizes, Ivy provides other benefits.
- Faster testing: Revamped the implementation of
TestBed
in Ivy to make it more efficient.TestBed.get
is deprecated we have to use the type-safe versionTestBed.inject
. - Better debugging: added new introduced the new ng object for debugging.
- Improved CSS class and style binding
- Type checking: Improved strictly type-checked. There are 3 modes for type checking the templates:
- Basic Mode: To enable set
fullTemplateTypeCheck: false
- Full Mode: To enable set
fullTemplateTypeCheck: true
- Strict Mode: To enable set
fullTemplateTypeCheck: true
andstrictTemplates: true
- Improved build errors: The Ivy compiler is not only faster and offers stronger type safety, It also makes all of the error messages easier to read.
- Improved build times, enabling AOT on by default: AOT even for dev-mode builds and
entryComponents
no required anymore for the dynamically load the components. These components will be discovered and compiled automatically by their usage. - Improved Internationalization (i18n)
2. Angular CLI
ng update
It will install the latest version as a temporary package to run the migration. This means that going forward, updates will take advantage of newer update features automatically.- Ng build will allow multiple Configurations like
ng build --configuration=prod,stage
ng add
you can specify if the package should be added to dependencies or not.
2. Component Harness
Another Angular 9 feature is to offer an alternative way to test components. By disconnecting the implementation details, one can make sure that the unit tests are correctly audited and less frail. Angular 9 is making harnesses available to any component author as part of the Component Dev Kit (CDK). In Angular 9. More info please check https://material.angular.io/guide/using-component-harnesses
3. TypeScript 3.7 support
Angular 9 added support for TypeScript 3.7
4. New Components
@angular/google-maps
@angular/youtube-player
Added in Version 9 and hammerjs is now optional We can use HammerModule from @angular/platform-browser.
CDK clipboard module is introduced in Angular 9.
Credits: