What’s new in Angular 9.1

Angular 9.1 brings performance improvements to the ngcc compatibility compiler and the Ivy compiler and runtime

What’s new in Angular 9.1

Angular 9.1 has arrived, with improvements for performance and concurrency to the ngcc compatibility compiler. The Ivy compilation and rendering pipeline received attention as well, resulting in better performance.

Angular 9.1, published March 25, follows the Angular 9.0 release, which became available as a production release on February 6, 2020. The version 9.0 upgrade to the popular TypeScript-based framework switches applications to the Ivy compiler and runtime by default.

Ivy offers faster, AOT compilation as well as smaller bundle sizes, faster testing, and better debugging. Improved CSS class and style binding is featured in Ivy as well, along with improvements in type checking, build errors, and build times. Also part of Angular 9 is ng update, which promises to be a more reliable and informative tool for updating applications and their dependencies. 

Angular provides dependency injection, which is particularly useful for assembling data services for applications, along with use of an HTML template to compose components. In Angular, developers still compose components with an HTML component that connects to TypeScript code for imperative parts of the program.

Where to download Angular 9.1 or previous releases

You can download the Angular production release from GitHub as well as beta releases. An Angular update guide has been published, along with a guide to upgrading to Angular 9.

New features in Angular 9.1

  • Performance optimizations for the ngcc, as well as concurrency and reliability improvements for ngcc monorepo use cases. The NPM postinstall script is no longer recommended. With ngcc, async processing is paused if another process has the lockfile. Also with ngcc, a source map flattening capability is able to load up a tree of source files connected by source maps and flatten them into a single source map. This source map maps directly from the final generated file to the original sources referenced by the intermediate source maps.
  • TypeScript 3.8 is supported.
  • Internationalization, via i18n, now supports RTL locale information.
  • Ivy performance has been improved by removing the unused event argument in listener instructions. Previously, Ivy generated an $event argument, even if it was not being used by the listener expressions. This could lead to unnecessary byte generation. Also, a compatibility fix for Ivy template-checking has been included.

New features in Angular 9.0

Aside from making Ivy the default, Angular 9.0 includes the following new features and improvements:

  • New options for providedIn, for creating an @Injectable service, include platform, which makes a service available in a special singleton platform injector shared by all applications on a page, and any, which provides a unique instance in every module that injects the token.
  • Component harnesses, to ensure that unit tests are correctly scoped and less brittle. Implementation details are abstracted away.
  • New components enabling inclusion of YouTube and Google Maps capabilities in applications.
  • TypeScript 3.7 and TypeScript 3.6 are supported.
  • Performance has been improved for eventListeners.
  • The default currency code in CurrencyPipe is now configurable.
  • 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.
  • To improve performance in the core, sanitization becomes tree-shakable in the Ivy renderer. 
  • 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.
  • The NgFormSelectorWarning selector has been removed.
  • For ngcc (Angular compatibility compiler), a migration has been added for undecorated child classes.
  • A number of bug fixes have been made for Ivy, the compiler, core, language-service, ngcc, and Bazel.

New features in Angular 8.2

Released in August 2019, Angular Version 8.2 includes:

  • To improve compiler performance, copying is avoided from prototype while cloning an object. This updates the clone function of the ApplySourceSpanTransformer class, where the for-in loop was used, which resulted in copying from prototype to own properties, consuming more memory.
  • TypeScript 3.5 support.
  • Compiling of targets used by Kythe tools with the Ivy renderer. This eliminates issues with cross references to transitive dependencies not being generated, because of how such dependencies are loaded by the legacy compiler.
  • Support for $element in upgraded component template and templateURL functions.
  • For Bazel, users now can pass a custom Bazel CompilerHost for an Angular compilation, supporting the overriding of the TypeScript compiler host.
  • A number of bug fixes, including increasing the memory limit of ngc under Bazel from 2GB to 4GB.

New features in Angular 8.1

  • Test helpers are provided for the upgrade/static library that wire up Angular and AngularJS injectors with no need for a full bootstrap of a hybrid app.
  • Deprecation of the integration with the Web Tracing Framework, which Angular had previously supported for performance testing. The Angular development team noted that the integration has not been maintained and likely does not work for most Angular applications today. 
  • Implementation of definitionAndBoundSpan, which is now preferred over definition. The implementation of definition has been refactored and simplified.
  • Deprecation of the platform-webworker APIs. The inclusion of this support had been experimental, to try to run an entire application in a Web Worker, for web content to run background scripts. Angular proponents no longer seek to do this.

Angular 8.1 also offers bug fixes for the Bazel build tool as well as the Angular core and router.

New features in Angular 8.0

Improvements in Angular 8, released in May 2019, include the following:

1 2 Page 1
Page 1 of 2