19.0.0-next.2
版本发布时间: 2024-08-29 05:38:30
angular/angular最新发布版本:19.0.0-next.7(2024-09-26 01:14:39)
19.0.0-next.2 (2024-08-28)
common
Commit | Description |
---|---|
automatically use sizes auto in NgOptimizedImage (#57479) |
compiler-cli
Commit | Description |
---|---|
reduce duplicate component style resolution (#57502) |
core
elements
Commit | Description |
---|---|
switch to ComponentRef.setInput & remove custom scheduler (#56728) |
http
Commit | Description |
---|---|
Dynamicaly call the global fetch implementation (#57531) |
router
Commit | Description |
---|---|
Do not unnecessarily run matcher twice on route matching (#57530) |
upgrade
Commit | Description |
---|---|
Address Trusted Types violations in @angular/upgrade (#57454) |
Breaking Changes
core
-
Render default fallback with empty
projectableNodes
.When passing an empty array to
projectableNodes
in thecreateComponent
API, the default fallback content of theng-content
will be rendered if present. To prevent rendering the default content, passdocument.createTextNode('')
as aprojectableNode
.For example:
// The first ng-content will render the default fallback content if present createComponent(MyComponent. { projectableNodes: [[], [secondNode]] }); // To prevent projecting the default fallback content: createComponent(MyComponent. { projectableNodes: [[document.createTextNode('')], [secondNode]] });
-
The timers that are used for zone coalescing and hybrid mode scheduling (which schedules an application state synchronization when changes happen outside the Angular zone) will now run in the zone above Angular rather than the root zone. This will mostly affect tests which use
fakeAsync
: these timers will now be visible tofakeAsync
and can be affected bytick
orflush
.
elements
- as part of switching away from custom CD behavior to the hybrid scheduler, timing of change detection around custom elements has changed subtly. These changes make elements more efficient, but can cause tests which encoded assumptions about how or when elements would be checked to require updating.