Tech

Angular 12 arrives with a mountain of improvements

Angular 12, the latest upgrade to Google’s popular TypeScript-based web framework, is now available as a product release. Among other improvements, the upgrade takes precedence over the new Ivy technology and abolishes the traditional ViewEngine compilation and rendering pipeline.

Launched on May 12, Angular 12 will be available on GitHub following a number of beta releases and release candidates. Angular 12 is approaching the framework’s “Ivy everywhere” vision. Ivy is described as a next-generation compilation and rendering pipeline that provides faster AOT (ahead-of-time) compilation.

The Angular team pointed out that ViewEngine will be removed in a future release. Current libraries using View Engine will continue to work with Ivy apps, but library authors are encouraged to start migrating to Ivy.

Angular 12 also transitions the Ivy-based language service, which provides features such as code completion and hints in templates, from opt-in to on by default. Other new features and improvements in the version 12 release:

  • To improve the performance of the compiler CLI, incremental compilation is allowed when redirected source files are present.
  • Null coalescing for writing clearer code in TypeScript classes now works in Angular templates.
  • Both Angular CDK and Angular Material expose new Sass API surfaces. @use syntax. After updating to Angular 12, the app will automatically switch to the new API by updating via ng update..
  • Tools are available to migrate legacy localization IDs to IDs using the latest algorithms.
  • Components now support inline Sass in styles Field @component Decorator.
  • running ng build It is now set to production by default, which saves steps and prevents accidental deployment of development builds.
  • Strict mode for catching errors early in the development cycle is enabled by default in the CLI.
  • The Webpack 5 module bundler is ready for production.
  • IE11 browser support has been deprecated.
  • For compilers, support is provided for converting component-style resources.
  • For language services, Angular property completion is provided only in templates.
  • For compiler CLI context Options are introduced for all requests that allow you to provide arbitrary data in a type-safe way. This feature addresses the need to configure an interceptor on the HTTP client for each request.
  • For animations, the DOM element is now properly deleted when the root view is deleted. This is a significant change.
  • Unused methods have been removed from to improve performance DomAdapter..
  • New format added localize-extractCalled legacy-migrate, Generates a JSON file that can be used to map legacy message IDs to canonical IDs.
  • A strict null check reports that the fragment may be null. This is a significant change.
  • The type of APP-INITIALIZER token has been changed to more accurately reflect the type of return value processed by Angular. This is a significant change.
  • Added support for disabling animations through BrowserAnimationsModulewithConfig..
  • The· emitevent Options added FormArray And FormGroup.. This is a significant change.
  • Added more fine-tuned controls routerLinkActiveOptions..
  • Implementation of custom router outlets is allowed.
  • Support for TypeScript 4.2 has been added, and support for TypeScript 4.0 and TypeScript 4.1 has ended.
  • Implementation of appendAll() Above method HttpParams..
  • For forms, minimum and maximum validators have been introduced.
  • Exporting a list of HTTP status codes.
  • The ability to access the location of components that use template files has been added to the Angular Language Service.
  • Added diagnostics that suggest turning on strictTemplates. This provides a way for the language server to get a diagnostic of compiler options.
  • A patch that adds an API to get the template type check block for the template in the file location, and the selection of the TS node in the TCB that corresponds to the template node for which the TCB request was made. This is useful for debugging.

It also introduces various bug fixes that affect the compiler, compiler-cli, Bazel build tools, routers, and other parts of Angular. A complete list of changes can be found on GitHub. The previous Angular 11 line debuted as a product release in November.

Copyright © 2021 IDG Communications, Inc.

Angular 12 arrives with a mountain of improvements

Source link Angular 12 arrives with a mountain of improvements

Related Articles

Back to top button