21.0.0
Breaking Changes📦 angularView on GitHub →
⚠ 3 breaking✨ 11 features🐛 7 fixes🔧 8 symbols
Summary
This release introduces experimental Navigation API support, enables host binding type checking by default, and updates localization to CLDR 47. It also includes significant internal refactoring for NgComponentOutlet and adds support for regex in templates.
⚠️ Breaking Changes
- The `ngModuleFactory` input of `NgComponentOutlet` has been removed. Use `ngComponentOutlet` directly with the component type or provide the module via other dependency injection mechanisms.
- TypeScript 5.8 is no longer supported. Ensure your project uses a compatible TypeScript version (typically 5.4, 5.5, 5.6, or 5.7 depending on other Angular constraints).
- Compiling with the `emitDeclarationOnly` TypeScript compiler option is now disallowed in the Angular compiler-cli.
Migration Steps
- Update TypeScript to a version below 5.8 (e.g., 5.7).
- Remove usage of the `ngModuleFactory` input from `NgComponentOutlet` in templates.
- Run the zoneless migration if moving to a zoneless architecture.
- Review host bindings as type checking is now enabled by default and may surface new build errors.
- Disable `emitDeclarationOnly` in tsconfig if it was previously enabled for Angular compilation.
✨ New Features
- Experimental support for the Navigation API in @angular/common.
- Support for optional keys in the KeyValue pipe.
- Update to CLDR 47 for improved localization data.
- Type checking of host bindings is now enabled by default in the compiler-cli.
- Added diagnostic for misconfigured @defer triggers.
- Migration tool for enabling zoneless mode by default.
- Allow passing application providers in bootstrapModule options.
- Introduced BootstrapContext for improved server-side bootstrapping.
- SimpleChanges is now generic for better type safety in ngOnChanges.
- Support for IntersectionObserver options in viewport triggers.
- Support for regular expressions directly in templates.
🐛 Bug Fixes
- Properly type ngComponentOutlet and improve typing of ngComponentOutletContent.
- Fix compiler issues with unbalanced parentheses in declaration blocks and complex selectors in :nth-child().
- Support arbitrary nesting in :host-context() and additional nesting in :host().
- Fix type inference for custom field controls and signal forms on native inputs.
- Ensure @for iteration over fields is reactive.
- Prevent ARIA property bindings from being incorrectly renamed to attributes.
- Fix false negatives in missingStructuralDirective diagnostics.
🔧 Affected Symbols
NgComponentOutletngComponentOutletContentKeyValuePipeSimpleChangesbootstrapModuleBootstrapContextngComponentOutletViewContainerRef