What’s new in Angular 9.0

Angular 9.0

While the current production release is Angular 8.2, development continues on the upcoming Angular 9.0 release.

Angular 9 already has a release candidate that includes performance improvements to the Ivy compilation and rendering pipeline, and will become the new default technology for Angular.

As Ivy will be the new compilation and rendering pipeline, the new default value of the Ivy flag will become “true.” And applications that run ngc compilation will also receive an Ivy build by default. Ivy is expected to generate code that will be easier to read and debug during runtime and will offer faster re-builds along with smaller payload sizes.

Here’s whats new in Angular 9.0:

  • To improve performance of the Ivy renderer, repeat global state accesses are removed from the i18n instructions when the information is already available. Ivy also gets a performance boost from the removal of extra SafeDetection code. And the @angular/localize package can be added to an Angular CLI project via ng add.
  • Also for the Ivy renderer, better error messages are offered for unknown components. In addition, a new flag has been added to localize-translate that allows the source locale to be specified.
  • For the compiler, a sourceSpan property on expression ASTs has been introduced to record the location of an expression relative to the entire source code file that contains it. This pertains to recording the absolute span of template expressions on the parser.
  • To improve performance in the core, sanitization becomes tree-shakable in the Ivy renderer. Sanitizer is optional in Ivy and DomSanitizer is tree-shakable. For consistency, DomSanitizer also is refactored to use the same functions as Ivy sanitization. There also are small changes in Ivy related to property bindings, saving on processing time. Ivy also gains a performance benefit from changing for-of loops in runtime code to regular for.
  • In the core, a schematic is featured that adds a Directive decorator to undecorated classes with fields that use Angular decorators.
  • Also in Ivy, template type-checking has been changed to produce ts.diagnostics. This mends a design issue in which the Angular compiler has produced both native TypeScript diagnostics and its own internal diagnostics format, which has not been optimal.
  • Also for the core, Angular adds a new migration schematic, as per the given migration plan.
    In Ivy, the DomElementSchema registry is used in ngtsc to check bindings to the DOM.
    Ivy does not read global state when interpolated values do not change. This feature refactors code so the global state (getSelectedIndex()) is not accessed until needed.
  • The deprecated ngform selector has been removed.
  • For Ivy, debugging has been improved for styles/classes. This includes a patch to introduce the printTable() and printSources() methods to DebugStylingContext, which can be used through the ng.getDebugNode helpers. In addition, type checking has been added for event bindings.
  • Styling performance has been improved in Ivy. Also for Ivy performance, a patch has been applied to ensure that the [style] and [class] based bindings are directly applied to an element’s style and classname attributes.
  • TypeScript 3.6 is supported.
  • A flag has been added to BootstrapOptions to enable coalesce event change detection to improve performance.
    For ngcc (Angular compatibility compiler), a migration has been added for undecorated child classes.
  • For the Angular language service, a replacementSpan field has been added that will include typed text in the completion value should a user suggest a completion. Prior to this, the completion value would be appended to the text already typed.
  • A number of bug fixes have been made for Ivy, the compiler, core, language-service, ngcc, and Bazel.

You can view the guide on getting Angular 9.0 from GitHub here.

 

Dominate the App Store.

Get the latest industry news first.

Roamni Case Study
How Jason & Greg Built an App Worth Over $5 Million
  • How to Get $100,000s in Funding for Your App
  • What Makes a Profitable and Successful App
  • 7 Critical Entrepreneurial Lessons From Jason and Greg
  • How to Create Apps that Get People Hooked
[if lte IE 8]
[if lte IE 8]
[name="utm_session_id"]
[name="utm_session_id"]