Change8

20.0.0

Breaking Changes
📦 angularView on GitHub →
1 breaking8 features🐛 8 fixes🔧 9 symbols

Summary

Angular v20 introduces significant template expression enhancements including exponentiation and tagged literals, alongside improved type checking for host bindings. It also enhances dynamic component capabilities with support for input and two-way bindings.

⚠️ Breaking Changes

  • Suspicious date patterns in the DatePipe now throw an error instead of failing silently or producing unexpected output. Ensure all date format strings are valid according to Angular's specification.

Migration Steps

  1. Review all usages of DatePipe to ensure date patterns do not contain suspicious or invalid characters that now trigger errors.
  2. Update any custom ViewportScroller implementations to handle the new ScrollOptions parameter.
  3. Check @for blocks in templates to ensure 'track' functions are correctly invoked to satisfy new extended diagnostics.

✨ New Features

  • NgTemplateOutlet now accepts undefined inputs.
  • Added support for passing ScrollOptions to ViewportScroller.
  • Template expressions now support the exponentiation operator (**), tagged template literals, the 'in' keyword, and the 'void' operator.
  • Added extended diagnostics for uninvoked track functions on @for blocks and invalid nullish coalescing.
  • Compiler now detects missing structural directive imports.
  • Support for type checking of host bindings.
  • Added input binding and two-way binding support to dynamically-created components.
  • Added a provider to report unhandled window errors to the ErrorHandler.

🐛 Bug Fixes

  • Cleanup updateLatestValue if a view is destroyed before a promise resolves.
  • Improved error handling in async pipe subscriptions.
  • NgOptimizedImage now issues a warning instead of an error when exceeding the preload limit.
  • Fixed host binding type issues and event name parsing in HostListener.
  • Corrected exponentiation operator associativity to be right-to-left.
  • Fixed incorrect spans for template literals and handling of let declarations inside i18n.
  • Removed TypeScript dependency from the linker.
  • Avoid fatal diagnostics for invalid module schemas or missing template files.

🔧 Affected Symbols

NgTemplateOutletViewportScrollerDatePipeAsyncPipeNgOptimizedImagehttpResourceHostListenerErrorHandlerRecursiveAstVisitor