Releases: angular/angular
Releases Β· angular/angular
v17.3.2
17.3.2 (2024-03-28)
compiler
Commit | Description |
---|---|
invoke method-based tracking function with context (#54960) |
compiler-cli
Commit | Description |
---|---|
report errors when initializer APIs are used on private fields (#55070) |
core
Commit | Description |
---|---|
establish proper injector resolution order for @defer blocks (#55079) |
http
Commit | Description |
---|---|
include transferCache when cloning HttpRequest (#54939) | |
manage different body types for caching POST requests (#54980) |
migrations
Commit | Description |
---|---|
account for variables in imports initializer (#55081) |
router
Commit | Description |
---|---|
RouterLinkActive will always remove active classes when links are not active (#54982) |
v18.0.0-next.1
18.0.0-next.1 (2024-03-20)
compiler
Commit | Description |
---|---|
capture data bindings for content projection purposes in blocks (#54876) |
compiler-cli
Commit | Description |
---|---|
symbol feature detection for the compiler (#54711) |
core
Commit | Description |
---|---|
Prevent markForCheck during change detection from causing infinite loops (#54900) |
platform-browser-dynamic
Commit | Description |
---|---|
unused RESOURCE_CACHE_PROVIDER API has been removed (#54875) |
platform-server
Commit | Description |
---|---|
remove deprecated platformDynamicServer API (#54874) |
|
remove deprecated ServerTransferStateModule API (#54874) |
|
remove deprecated useAbsoluteUrl and baseUrl from PlatformConfig (#54874) |
|
remove legacy URL handling logic (#54874) |
router
Commit | Description |
---|---|
Allow Route.redirectTo to be a function which returns a string or UrlTree (#52606) | |
Routed components never inherit RouterOutlet EnvironmentInjector (#54265) |
Breaking Changes
platform-browser-dynamic
- No longer used
RESOURCE_CACHE_PROVIDER
APIs have been removed.
platform-server
-
deprecated
platformDynamicServer
has been removed. Add animport @angular/compiler
and replace the usage withplatformServer
-
deprecated
ServerTransferStateModule
has been removed.TransferState
can be use without providing this module. -
deprecated
useAbsoluteUrl
andbaseUrl
been removed fromPlatformConfig
. Provide and absoluteurl
instead. -
Legacy handling or Node.js URL parsing has been removed from
ServerPlatformLocation
.The main differences are;
pathname
is always suffixed with a/
.port
is empty whenhttp:
protocol and port in url is80
port
is empty whenhttps:
protocol and port in url is443
router
- This change allows
Route.redirectTo
to be a function
in addition to the previous string. Code which expectsredirectTo
to
only be a string onRoute
objects will need to be adjusted. - Providers available to the routed components always
come from the injector heirarchy of the routes and never inherit from
theRouterOutlet
. This means that providers available only to the
component that defines theRouterOutlet
will no longer be available to
route components in any circumstances. This was already the case
whenever routes defined providers, either through lazy loading an
NgModule
or through explicitproviders
on the route config.
v17.3.1
v18.0.0-next.0
18.0.0-next.0 (2024-03-14)
compiler-cli
Commit | Description |
---|---|
preserve original reference to non-deferrable dependency (#54759) |
core
Commit | Description |
---|---|
ApplicationRef.tick should respect OnPush for host bindings (#53718) |
|
ApplicationRef.tick should respect OnPush for host bindings (#53718) (#53718) |
|
ComponentFixture autoDetect respects OnPush flag of host view (#54824) |
|
Change Detection will continue to refresh views while marked for check (#54734) | |
ComponentFixture autodetect should detect changes within ApplicationRef.tick (#54733) | |
ensure change detection runs in a reasonable timeframe with zone coalescing (#54578) | |
Ensure views marked for check are refreshed during change detection (#54735) | |
Update ApplicationRef.tick loop to only throw in dev mode (#54848) |
router
Commit | Description |
---|---|
Add ability to return UrlTree with NavigationBehaviorOptions from guards (#45023) |
Breaking Changes
core
OnPush
views at the root of the application need to
be marked dirty for their host bindings to refresh. Previously, the host
bindings were refreshed for all root views without respecting the
OnPush
change detection strategy.OnPush
views at the root of the application need to
be marked dirty for their host bindings to refresh. Previously, the host
bindings were refreshed for all root views without respecting the
OnPush
change detection strategy.- The
ComponentFixture
autoDetect
feature will no
longer refresh the component's host view when the component isOnPush
and not marked dirty. This exposes existing issues in components which
claim to beOnPush
but do not correctly callmarkForCheck
when they
need to be refreshed. If this change causes test failures, the easiest
fix is to change the component toChangeDetectionStrategy.Default
. - When Angular runs change detection, it will continue to
refresh any views attached toApplicationRef
that are still marked for
check after one round completes. In rare cases, this can result in infinite
loops when certain patterns continue to mark views for check using
ChangeDetectorRef.detectChanges
. This will be surfaced as a runtime
error with theNG0103
code. - The
ComponentFixture.autoDetect
feature now executes
change detection for the fixture withinApplicationRef.tick
. This more
closely matches the behavior of how a component would refresh in
production. The order of component refresh in tests may be slightly
affected as a result, especially when dealing with additional components
attached to the application, such as dialogs. Tests sensitive to this
type of change (such as screenshot tests) may need to be updated.
Concretely, this change means that the component will refresh before
additional views attached toApplicationRef
(i.e. dialog components).
Prior to this change, the fixture component would refresh after other
views attached to the application. - The exact timing of change detection execution when
using event or run coalescing withNgZone
is now the first of either
setTimeout
orrequestAnimationFrame
. Code which relies on this
timing (usually by accident) will need to be adjusted. If a callback
needs to execute after change detection, we recommendafterNextRender
instead of something likesetTimeout
. - Newly created and views marked for check and reattached
during change detection are now guaranteed to be refreshed in that same
change detection cycle. Previously, if they were attached at a location
in the view tree that was already checked, they would either throw
ExpressionChangedAfterItHasBeenCheckedError
or not be refreshed until
some future round of change detection. In rare circumstances, this
correction can cause issues. We identified one instance that relied on
the previous behavior by reading a value on initialization which was
queued to be updated in a microtask instead of being available in the
current change detection round. The component only read this value during
initialization and did not read it again after the microtask updated it.
router
- Guards can now return
RedirectCommand
for redirects
in addition toUrlTree
. Code which expects onlyboolean
orUrlTree
values inRoute
types will need to be adjusted.
v17.3.0
17.3.0 (2024-03-13)
compiler
Commit | Description |
---|---|
Enable template pipeline by default. (#54571) | |
handle two-way bindings to signal-based template variables in instruction generation (#54714) | |
not catching for loop empty tracking expressions (#54772) |
compiler-cli
Commit | Description |
---|---|
account for as expression in docs extraction (#54414) | |
detect when the linker is working in unpublished angular and widen supported versions (#54439) | |
flag two-way bindings to non-signal values in templates (#54714) | |
support ModuleWithProviders literal detection with typeof (#54650) |
core
Commit | Description |
---|---|
add API to inject attributes on the host node (#54604) | |
add migration for invalid two-way bindings (#54630) | |
expose new output() API (#54650) |
|
introduce outputFromObservable() interop function (#54650) |
|
introduce outputToObservable interop helper (#54650) |
|
support TypeScript 5.4 (#54414) | |
ensure all initializer functions run in an injection context (#54761) | |
exclude class attribute intended for projection matching from directive matching (#54800) | |
prevent infinite loops in clobbered elements check (#54425) | |
return a readonly signal on asReadonly . (#54706) |
|
speed up retrieval of DestroyRef in EventEmitter (#54748) |
http
Commit | Description |
---|---|
exclude caching for authenticated HTTP requests (#54746) |
router
Commit | Description |
---|---|
Add reusable types for router guards (#54580) | |
Navigations triggered by cancellation events should cancel previous navigation (#54710) |
v17.3.0-rc.0
17.3.0-rc.0 (2024-03-06)
compiler-cli
Commit | Description |
---|---|
support ModuleWithProviders literal detection with typeof (#54650) |
|
unwrap expressions with type parameters in query read property (#54647) |
core
Commit | Description |
---|---|
add migration for invalid two-way bindings (#54630) | |
expose new output() API (#54650) |
|
introduce outputFromObservable() interop function (#54650) |
|
introduce outputToObservable interop helper (#54650) |
|
apply TestBed provider overrides to @defer dependencies (#54667) |
|
generic inference for signal inputs may break with --strictFunctionTypes (#54652) |
|
return a readonly signal on asReadonly . (#54706) |
|
untrack various core operations (#54614) |
router
Commit | Description |
---|---|
Add reusable types for router guards (#54580) |
v17.2.4
17.2.4 (2024-03-06)
compiler-cli
Commit | Description |
---|---|
unwrap expressions with type parameters in query read property (#54647) |
core
Commit | Description |
---|---|
apply TestBed provider overrides to @defer dependencies (#54667) |
|
generic inference for signal inputs may break with --strictFunctionTypes (#54652) |
|
return a readonly signal on asReadonly . (#54719) |
|
untrack various core operations (#54614) |
v17.3.0-next.1
17.3.0-next.1 (2024-02-27)
common
Commit | Description |
---|---|
AsyncPipe should not call markForCheck on subscription (#54554) |
compiler
Commit | Description |
---|---|
Enable template pipeline by default. (#54571) |
compiler-cli
Commit | Description |
---|---|
account for as expression in docs extraction (#54414) | |
catch function instance properties in interpolated signal diagnostic (#54325) | |
identify aliased initializer functions (#54480) | |
identify aliased initializer functions (#54609) |
core
Commit | Description |
---|---|
add API to inject attributes on the host node (#54604) | |
support TypeScript 5.4 (#54414) | |
collect providers from NgModules while rendering @defer block (#52881) |
|
fix typo in injectors.svg file (#54596) |
migrations
Commit | Description |
---|---|
resolve infinite loop for a single line element with a long tag name and angle bracket on a new line (#54588) |
v17.2.3
17.2.3 (2024-02-27)
common
Commit | Description |
---|---|
AsyncPipe should not call markForCheck on subscription (#54554) |
compiler-cli
Commit | Description |
---|---|
catch function instance properties in interpolated signal diagnostic (#54325) | |
identify aliased initializer functions (#54480) | |
identify aliased initializer functions (#54609) |
core
Commit | Description |
---|---|
collect providers from NgModules while rendering @defer block (#52881) |
|
fix typo in injectors.svg file (#54596) |
migrations
Commit | Description |
---|---|
resolve infinite loop for a single line element with a long tag name and angle bracket on a new line (#54588) |
v17.3.0-next.0
17.3.0-next.0 (2024-02-21)
compiler-cli
Commit | Description |
---|---|
detect when the linker is working in unpublished angular and widen supported versions (#54439) |