16.0.0-next.5 (2023-03-29)
Breaking Changes
bazel
- Several changes to the Angular Package Format (APF)
- Removal of FESM2015
- Replacing ES2020 with ES2022
- Replacing FESM2020 with FESM2022
- Several changes to the Angular Package Format (APF)
- Removal of FESM2015
- Replacing ES2020 with ES2022
- Replacing FESM2020 with FESM2022
common
- If the 'ngTemplateOutletContext' is different from the context, it will result in a compile-time error.
Before the change, the following template was compiling:
interface MyContext {
$implicit: string;
}
@Component({
standalone: true,
imports: [NgTemplateOutlet],
selector: 'person',
template: `
<ng-container
*ngTemplateOutlet="
myTemplateRef;
context: { $implicit: 'test', xxx: 'xxx' }
"></ng-container>
`,
})
export class PersonComponent {
myTemplateRef!: TemplateRef<MyContext>;
}
However, it does not compile now because the 'xxx' property does not exist in 'MyContext', resulting in the error: 'Type '{ $implicit: string; xxx: string; }' is not assignable to type 'MyContext'.'
The solution is either:
- add the 'xxx' property to 'MyContext' with the correct type or
- add '$any(...)' inside the template to make the error disappear. However, adding '$any(...)' does not correct the error but only preserves the previous behavior of the code.
core
-
entryComponents
has been deleted from the @NgModule
and @Component
public APIs. Any usages can be removed since they weren't doing anyting.
ANALYZE_FOR_ENTRY_COMPONENTS
injection token has been deleted. Any references can be removed.
- ComponentRef.setInput will only set the input on the
component if it is different from the previous value (based on Object.is
equality). If code relies on the input always being set, it should be
updated to copy objects or wrap primitives in order to ensure the input
value differs from the previous call to setInput
.
Deprecations
core
makeStateKey
, StateKey
and TransferState
exports have been moved from @angular/platform-browser
to @angular/core
. Please update the imports.
- import {makeStateKey, StateKey, TransferState} from '@angular/platform-browser';
+ import {makeStateKey, StateKey, TransferState} from '@angular/core';
- The
@Directive
/@Component
moduleId
property is now
deprecated. It did not have any effect for multiple major versions and
will be removed in v17.
platform-server
PlatformConfig.baseUrl
and PlatformConfig.useAbsoluteUrl
platform-server config options are deprecated as these were not used.
common
Commit
| Description
|
| invalid ImageKit transformation (#49201)
|
| strict type checking for ngtemplateoutlet (#48374)
|
compiler
Commit
| Description
|
| do not unquote CSS values (#49460)
|
| handle trailing comma in object literal (#49535)
|
compiler-cli
Commit
| Description
|
| Add an extended diagnostic for nSkipHydration (#49512)
|
core
Commit
| Description
|
| add assertInInjectionContext (#49529)
|
| add migration to remove moduleId references (#49496)
|
| effects can optionally return a cleanup function (#49625)
|
| expose makeStateKey , StateKey and TransferState (#49563)
|
| Mark components for check if they read a signal (#49153)
|
| remove entryComponents (#49484)
|
| ComponentRef.setInput only sets input when not equal to previous (#49607)
|
| deprecate moduleId @Component property (#49496)
|
| set style property value to empty string instead of an invalid value (#49460)
|
http
Commit
| Description
|
| force macro task creation during HTTP request (#49546)
|
migrations
Commit
| Description
|
| Migration to remove Router guard and resolver interfaces (#49337)
|
platform-browser
Commit
| Description
|
| set nonce attribute in a platform compatible way (#49624)
|
platform-server
Commit
| Description
|
| deprecate useAbsoluteUrl and baseUrl (#49546)
|
router
Commit
| Description
|
| Ensure Router preloading works with lazy component and static children (#49571)
|
| fix #49457 outlet activating with old info (#49459)
|
| Route matching should only happen once when navigating (#49163)
|
| Route matching should only happen once when navigating (#49163)
|
Special Thanks
Alan Agius, Alex Rickabaugh, Andrew Kushnir, Andrew Scott, Asaf Malin, Jan Cabadaj, Jessica Janiuk, JiaLiPassion, Kristiyan Kostadinov, Matthieu Riegler, Paul Gschwendtner, Pawel Kozlowski, Sid, Tano Abeleyra and tomalaforge