v22.0.0-next.7
Breaking Changes📦 angularView on GitHub →
⚠ 6 breaking✨ 3 features🐛 10 fixes🔧 7 symbols
Summary
This release introduces new features like configuration-based application bootstrapping and directive de-duplication, while removing deprecated APIs like ComponentFactoryResolver and dropping support for older TypeScript versions.
⚠️ Breaking Changes
- The second argument of appRef.bootstrap no longer accepts `any`. Ensure the element passed is not nullable.
- TypeScript versions older than 6.0 are no longer supported.
- ComponentFactoryResolver and ComponentFactory are no longer available. Pass the component class directly to APIs that previously required a factory, such as ViewContainerRef.createComponent or use the standalone createComponentFunction.
- ComponentFactoryResolver and ComponentFactory are no longer available. Pass the component class directly to APIs that previously required a factory, such as ViewContainerRef.createComponent or use the standalone createComponent function.
- Styles are removed when they appear unused by an associated host. This may cause other DOM elements outside of Angular or those not using ViewEncapsulation.Emulated to appear unstyled.
- The currentSnapshot parameter in CanMatchFn and the canMatch method of the CanMatch interface is now required. Existing class implementations of CanMatch must now include the third argument to satisfy the interface.
Migration Steps
- Ensure the element passed to appRef.bootstrap is not nullable.
- Update TypeScript to version 6.0 or newer.
- Replace usages of ComponentFactoryResolver and ComponentFactory with direct component class usage in APIs like ViewContainerRef.createComponent, or use the standalone createComponent function.
- If implementing CanMatch interface, ensure the canMatch method now accepts the required third argument (currentSnapshot).
✨ New Features
- Added support for bootstrapping via ApplicationRef with configuration.
- Added de-duplication for host directives.
- Added migration for CanMatchFn snapshot parameter.
🐛 Bug Fixes
- Handled nested brackets in host object bindings.
- Added error handling for type parameter declarations.
- Resolved TCB mapping failure for safe property reads with as any.
- Handled missing serialized container hydration data.
- Removed obsolete iOS cursor pointer hack in event delegation.
- Aligned FormField CVA selection priority with standard forms.
- Allowed late-bound input types for signals forms.
- Deduplicated writeValue calls in CVA interop.
- Improved quick info retrieval at local variable location to align with TS semantics and support type narrowing.
- Removed unused styles when associated host is dropped.