Deliver web apps with confidence 🚀
Commit | Description |
---|---|
For FatalDiagnosticError , hide the message field without affecting the emit (#55160) |
Commit | Description |
---|---|
use switch statements to narrow Angular switch blocks (#55168) |
Commit | Description |
---|---|
Unified Control State Change Events (#54579) |
Commit | Description |
---|---|
avoid generating TS syntactic diagnostics for templates (#55091) |
Commit | Description |
---|---|
avoid conflicts with some greek letters in control flow migration (#55113) |
Commit | Description |
---|---|
add withI18nSupport() in developer preview (#55130) |
Commit | Description |
---|---|
Allow resolvers to return RedirectCommand (#54556) |
|
Routed components never inherit RouterOutlet EnvironmentInjector (#54265) |
RouterOutlet
. This means that providers available only to the
component that defines the RouterOutlet
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 explicit providers
on the route config.Commit | Description |
---|---|
include transferCache when cloning HttpRequest (#54939) | |
manage different body types for caching POST requests (#54980) |
Commit | Description |
---|---|
allow external projects to use provided compiler options (#55035) | |
prevent underlying TS Service from handling template files (#55003) |
Commit | Description |
---|---|
account for variables in imports initializer (#55081) |
Commit | Description |
---|---|
preserve replaceUrl when returning a urlTree from CanActivate (#54042) | |
RouterLinkActive will always remove active classes when links are not active (#54982) |
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 unfinished HttpClient
requests. This will cause
tests that await
the whenStable
promise to time out when there are
incomplete requests. To fix this, remove the whenStable
,
instead wait for another condition, or ensure HttpTestingController
mocks responses for all requests. Try adding HttpTestingController.verify()
before your await 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.
UrlTree
as a redirect, the
redirecting navigation will now use replaceUrl
if the initial
navigation was also using the replaceUrl
option. If this is not
desirable, the redirect can configure new NavigationBehaviorOptions
by
returning a RedirectCommand
with the desired options instead of UrlTree
.Commit | Description |
---|---|
invoke method-based tracking function with context (#54960) |
Commit | Description |
---|---|
report errors when initializer APIs are used on private fields (#55070) |
Commit | Description |
---|---|
establish proper injector resolution order for @defer blocks (#55079) |
Commit | Description |
---|---|
include transferCache when cloning HttpRequest (#54939) | |
manage different body types for caching POST requests (#54980) |
Commit | Description |
---|---|
account for variables in imports initializer (#55081) |
Commit | Description |
---|---|
RouterLinkActive will always remove active classes when links are not active (#54982) |
Commit | Description |
---|---|
capture data bindings for content projection purposes in blocks (#54876) |
Commit | Description |
---|---|
symbol feature detection for the compiler (#54711) |
Commit | Description |
---|---|
Prevent markForCheck during change detection from causing infinite loops (#54900) |
Commit | Description |
---|---|
unused RESOURCE_CACHE_PROVIDER API has been removed (#54875) |
Commit | Description |
---|---|
Allow Route.redirectTo to be a function which returns a string or UrlTree (#52606) | |
Routed components never inherit RouterOutlet EnvironmentInjector (#54265) |
RESOURCE_CACHE_PROVIDER
APIs have been removed.deprecated platformDynamicServer
has been removed. Add an import @angular/compiler
and replace the usage with platformServer
deprecated ServerTransferStateModule
has been removed. TransferState
can be use without providing this module.
deprecated useAbsoluteUrl
and baseUrl
been removed from PlatformConfig
. Provide and absolute url
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 when http:
protocol and port in url is 80
port
is empty when https:
protocol and port in url is 443
Route.redirectTo
to be a function
in addition to the previous string. Code which expects redirectTo
to
only be a string on Route
objects will need to be adjusted.RouterOutlet
. This means that providers available only to the
component that defines the RouterOutlet
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 explicit providers
on the route config.Commit | Description |
---|---|
preserve original reference to non-deferrable dependency (#54759) |
Commit | Description |
---|---|
Add ability to return UrlTree with NavigationBehaviorOptions from guards (#45023) |
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.ComponentFixture
autoDetect
feature will no
longer refresh the component's host view when the component is OnPush
and not marked dirty. This exposes existing issues in components which
claim to be OnPush
but do not correctly call markForCheck
when they
need to be refreshed. If this change causes test failures, the easiest
fix is to change the component to ChangeDetectionStrategy.Default
.ApplicationRef
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 the NG0103
code.ComponentFixture.autoDetect
feature now executes
change detection for the fixture within ApplicationRef.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 to ApplicationRef
(i.e. dialog components).
Prior to this change, the fixture component would refresh after other
views attached to the application.NgZone
is now the first of either
setTimeout
or requestAnimationFrame
. Code which relies on this
timing (usually by accident) will need to be adjusted. If a callback
needs to execute after change detection, we recommend afterNextRender
instead of something like setTimeout
.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.RedirectCommand
for redirects
in addition to UrlTree
. Code which expects only boolean
or UrlTree
values in Route
types will need to be adjusted.Commit | Description |
---|---|
exclude caching for authenticated HTTP requests (#54746) |
Commit | Description |
---|---|
Add reusable types for router guards (#54580) | |
Navigations triggered by cancellation events should cancel previous navigation (#54710) |
Commit | Description |
---|---|
support ModuleWithProviders literal detection with typeof (#54650) |
|
unwrap expressions with type parameters in query read property (#54647) |
Commit | Description |
---|---|
Add reusable types for router guards (#54580) |
Commit | Description |
---|---|
unwrap expressions with type parameters in query read property (#54647) |