Change8

v22.0.0

📦 angularView on GitHub →
17 features🐛 18 fixes🔧 5 symbols

Summary

This release introduces several new features across the compiler, CLI, and core, including support for optional chaining in expressions and Node.js 26.0.0. Numerous bug fixes address issues related to type checking, compilation output, and binding sanitization.

Migration Steps

  1. Use the provided schematics to migrate `provideHttpClient` to keep using the `HttpXhrBackend` implementation.
  2. Run the migration to add `ChangeDetectionStrategy.Eager` where applicable.

✨ New Features

  • Compiler: Allow safe navigation to correctly narrow down nullables.
  • Compiler: Angular expressions with optional chaining now return `undefined`.
  • Compiler: Support comments in html element.
  • CompilerCli: Add support for Node.js 26.0.0.
  • CompilerCli: Adds warning for prefetch without main defer trigger.
  • CompilerCli: Support external TCBs with copied content in specific mode.
  • Core: Add `IdleRequestOptions` support to `IdleService`.
  • Core: Add `provideWebMcpTools`.
  • Core: Add an `injectAsync` helper function.
  • Core: Add a schematics to migrate `provideHttpClient` to keep using the `HttpXhrBackend` implementation.
  • Core: Add ability to cache resources for SSR.
  • Core: Add migration to add `ChangeDetectionStrategy.Eager` where applicable.
  • Core: Add special return statuses for resource params.
  • Core: Add TestBed.getFixture.
  • Core: Allow debouncing signals.
  • Core: Allow other expression for exhaustive typechecking.
  • Core: Allow synchronous values for stream Resources.

🐛 Bug Fixes

  • Compiler: Abstract emitter producing incorrect code for dynamic imports.
  • Compiler: Don't bind inputs/outputs for `data-` attributes.
  • Compiler: Don't escape dollar sign in literal expression.
  • Compiler: Enforce parentheses containing arguments for :host-context.
  • Compiler: Invalid type checking code if field name needs to be quoted.
  • Compiler: Normalize tag names with custom namespaces in DomElementSchemaRegistry (#68868).
  • Compiler: Preserve leading commas in animation definitions.
  • Compiler: Remove dedicated support for legacy shadow DOM selectors.
  • Compiler: Remove deprecated shadow CSS encapsulation polyfills.
  • Compiler: Sanitize dynamic href and xlink:href bindings on SVG a elements (#68868).
  • Compiler: Simplify handling of colon host with a selector list.
  • Compiler: Stop generating unused field.
  • Compiler: Throw on duplicate input/outputs.
  • Compiler: Throw on invalid in expressions.
  • Compiler: Type check invalid for loops.
  • CompilerCli: Animation events not type checked properly when bound through HostListener decorator.
  • CompilerCli: Resolve TCB mapping failure for safe property reads with as any.
  • CompilerCli: Transform dropping exclamationToken from properties.

Affected Symbols