Releases: angular/angular
v17.3.6
v18.0.0-next.5
18.0.0-next.5 (2024-04-17)
common
Commit | Description |
---|---|
remove deprecated isPlatformWorkerApp and isPlatformWorkerUi API (#55302) |
compiler
Commit | Description |
---|---|
remove container index from conditional instruction (#55190) | |
remove support for unassignable expressions in two-way bindings (#55342) |
core
Commit | Description |
---|---|
Add ability to configure zone change detection to use zoneless scheduler (#55252) | |
Add build target for jsaction contract binary. (#55319) | |
Add zoneless change detection provider as experimental (#55329) | |
Modify EventType from an enum to an object. (#55323) | |
Synchronize changes from internal JSAction codebase. (#55182) | |
Angular should not ignore changes that happen outside the zone (#55102) | |
Fix null dereference error addEvent (#55353) |
|
Remove deprecated Testability methods (#53768) |
service-worker
Commit | Description |
---|---|
avoid running CDs on controllerchange (#54222) |
Breaking Changes
common
- The deprecated
isPlatformWorkerUi
andisPlatformWorkerApp
have been removed without replacement, as they serve no purpose since the removal of the WebWorker platform.
compiler
- Angular only supports writable expressions inside of two-way bindings.
core
-
Angular will ensure change detection runs, even when the state update originates from
outside the zone, tests may observe additional rounds of change
detection compared to the previous behavior.This change will be more likely to impact existing unit tests.
This should usually be seen as more correct and the test should be updated,
but in cases where it is too much effort to debug, the test can revert to the old behavior by adding
provideZoneChangeDetection({schedulingMode: NgZoneSchedulingMode.NgZoneOnly})
to theTestBed
providers.Similarly, applications which may want to update state outside the zone
and not trigger change detection can add
provideZoneChangeDetection({schedulingMode: NgZoneSchedulingMode.NgZoneOnly})
to the providers inbootstrapApplication
or add
schedulingMode: NgZoneSchedulingMode.NgZoneOnly
to the
BootstrapOptions
ofbootstrapModule
. -
Testability methods
increasePendingRequestCount
,
decreasePendingRequestCount
andgetPendingRequestCount
have been
removed. This information is tracked with zones.
v17.3.5
v18.0.0-next.4
18.0.0-next.4 (2024-04-10)
common
Commit | Description |
---|---|
invalid ImageKit quality parameter (#55193) | |
skip transfer cache on client (#55012) |
compiler
Commit | Description |
---|---|
output input flags as a literal (#55215) |
core
Commit | Description |
---|---|
TestBed should not override NgZone from initTestEnvironment (#55226) |
language-service
Commit | Description |
---|---|
implement getDefinitionAtPosition for Angular templates (#55269) |
v17.3.4
v18.0.0-next.3
18.0.0-next.3 (2024-04-03)
compiler
Commit | Description |
---|---|
For FatalDiagnosticError , hide the message field without affecting the emit (#55160) |
compiler-cli
Commit | Description |
---|---|
use switch statements to narrow Angular switch blocks (#55168) |
core
Commit | Description |
---|---|
Add event delegation library to queue up events and replay them when the application is ready (#55121) | |
add support for i18n hydration (#54823) | |
do not save point-in-time setTimeout and rAF references (#55124) |
|
handle ChainedInjector s in injector debug utils (#55144) |
|
prevent i18n hydration from cleaning projected nodes (#54823) | |
support content projection and VCRs in i18n (#54823) | |
test cleanup should not throw if Zone is not present (#55096) | |
zoneless scheduler should check if Zone is defined before accessing it (#55118) |
forms
Commit | Description |
---|---|
Unified Control State Change Events (#54579) |
language-service
Commit | Description |
---|---|
avoid generating TS syntactic diagnostics for templates (#55091) |
migrations
Commit | Description |
---|---|
avoid conflicts with some greek letters in control flow migration (#55113) |
platform-browser
Commit | Description |
---|---|
add withI18nSupport() in developer preview (#55130) |
router
Commit | Description |
---|---|
Allow resolvers to return RedirectCommand (#54556) |
|
Routed components never inherit RouterOutlet EnvironmentInjector (#54265) |
Breaking Changes
router
- 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.3
v18.0.0-next.2
18.0.0-next.2 (2024-03-28)
compiler
Commit | Description |
---|---|
capture all control flow branches for content projection in if blocks (#54921) | |
capture switch block cases for content projection (#54921) | |
declare for loop aliases in addition to new name (#54942) | |
invoke method-based tracking function with context (#54960) | |
throw error if item name and context variables conflict (#55045) |
compiler-cli
Commit | Description |
---|---|
add partial compilation support for deferred blocks (#54908) | |
drop support for TypeScript older than 5.4 (#54961) | |
add diagnostic if initializer API is used outside of an initializer (#54993) | |
report cases where initializer APIs are used in a non-directive class (#54993) | |
report errors when initializer APIs are used on private fields (#54981) |
core
Commit | Description |
---|---|
add support for fallback content in ng-content (#54854) | |
ComponentFixture stability should match ApplicationRef (#54949) |
|
account for re-projected ng-content elements with fallback content (#54854) | |
correctly project single-root content inside control flow (#54921) | |
establish proper injector resolution order for @defer blocks (#55079) |
|
Fix clearing of pending task in zoneless cleanup implementation (#55074) |
http
Commit | Description |
---|---|
include transferCache when cloning HttpRequest (#54939) | |
manage different body types for caching POST requests (#54980) |
language-service
Commit | Description |
---|---|
allow external projects to use provided compiler options (#55035) | |
prevent underlying TS Service from handling template files (#55003) |
migrations
Commit | Description |
---|---|
account for variables in imports initializer (#55081) |
router
Commit | Description |
---|---|
preserve replaceUrl when returning a urlTree from CanActivate (#54042) | |
RouterLinkActive will always remove active classes when links are not active (#54982) |
Breaking Changes
compiler-cli
-
- Angular no longer supports TypeScript versions older than 5.4.
core
-
ComponentFixture.whenStable
now matches the
ApplicationRef.isStable
observable. Prior to this change, stability
of the fixture did not include everything that was considered in
ApplicationRef
.whenStable
of the fixture will now include unfinished
router navigations and unfinishedHttpClient
requests. This will cause
tests thatawait
thewhenStable
promise to time out when there are
incomplete requests. To fix this, remove thewhenStable
,
instead wait for another condition, or ensureHttpTestingController
mocks responses for all requests. Try addingHttpTestingController.verify()
before yourawait fixture.whenStable
to identify the open requests.
Also, make sure your tests wait for the stability promise. We found many
examples of tests that did not, meaning the expectations did not execute
within the test body.In addition,
ComponentFixture.isStable
would synchronously switch to
true in some scenarios but will now always be asynchronous.
router
- When a a guard returns a
UrlTree
as a redirect, the
redirecting navigation will now usereplaceUrl
if the initial
navigation was also using thereplaceUrl
option. If this is not
desirable, the redirect can configure newNavigationBehaviorOptions
by
returning aRedirectCommand
with the desired options instead ofUrlTree
.
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.