17.0.0 (2023-11-08)
Commit | Description |
---|---|
remove support for Node.js v16 (#51755) |
animations
Commit | Description |
---|---|
Add the possibility of lazy loading animations code. (#50738) | |
remove code duplication between entry-points (#51500) | |
deprecation of AnimationDriver.NOOP (#51843)
|
benchpress
Commit | Description |
---|---|
report gc and render time spent in script (#50771) |
common
Commit | Description |
---|---|
make the warning for lazy-loaded lcp image an error (#51748) | |
upgrade warning to logged error for lazy-loaded LCP images using NgOptimizedImage (#52004) | |
add missing types field for @angular/common/locales of exports in package.json (#52080) | |
allow to specify only some properties of DatePipeConfig (#51287)
| |
apply fixed_srcset_width value only to fixed srcsets (#52459) | |
missing space in ngSwitch equality warning (#52180) | |
remove code duplication between entry-points (#51500) | |
use === operator to match NgSwitch cases (#51504) |
compiler
Commit | Description |
---|---|
add docs extraction for type aliases (#52118) | |
expand class api doc extraction (#51733) | |
extract api docs for interfaces (#52006) | |
extract api for fn overloads and abtract classes (#52040) | |
extract directive docs info (#51733) | |
extract doc info for JsDoc (#51733) | |
extract docs for accessors, rest params, and types (#51733) | |
extract docs for top level functions and consts (#51733) | |
extract docs info for enums, pipes, and NgModules (#51733) | |
extract docs via exports (#51828) | |
initial skeleton for API doc extraction (#51733) | |
account for type-only imports in defer blocks (#52343) | |
add diagnostic for inaccessible deferred trigger (#51922) | |
allocating unnecessary slots in conditional instruction (#51913) | |
allow comments between switch cases (#52449) | |
allow decimals in defer block time values (#52433) | |
allow newlines in track and let expressions (#52137) | |
allow nullable values in for loop block (#51997) | |
apply style on :host attributes in prod builds. (#49118) | |
avoid error in template parser for tag names that can occur in object prototype (#52225) | |
compilation error when for loop block expression contains new line (#52447) | |
don't allocate variable to for loop expression (#52158) | |
enable block syntax in the linker (#51979) | |
forward referenced dependencies not identified as deferrable (#52017) | |
narrow the type of expressions in event listeners inside if blocks (#52069) | |
narrow the type of expressions in event listeners inside switch blocks (#52069) | |
narrow the type of the aliased if block expression (#51952) | |
ng-template directive invoke twice at the root of control flow (#52515) | |
pipes used inside defer triggers not being picked up (#52071) | |
pipes using DI not working in blocks (#52112) | |
project control flow root elements into correct slot (#52414) | |
template type checking not reporting diagnostics for incompatible type comparisons (#52322) | |
update the minVersion if component uses block syntax (#51979) | |
work around TypeScript bug when narrowing switch statements (#52110) | |
further reduce bundle size using arrow functions (#52010) |
compiler-cli
Commit | Description |
---|---|
allow non-array imports for standalone component in local compilation mode (#51819) | |
bypass static resolving of the component's changeDetection field in local compilation mode (#51848) | |
fix NgModule injector def in local compilation mode when imports/exports are non-array expressions (#51819) | |
handle nested qualified names in ctor injection in local compilation mode (#51947) | |
resolve component encapsulation enum in local compilation mode (#51848) |
core
Commit | Description |
---|---|
Deprecate ChangeDetectorRef.checkNoChanges (#52431)
| |
add new list reconcilation algorithm (#51980) | |
add schematic to escape block syntax characters (#51905) | |
Add schematic to migrate control flow syntax (#52035) | |
add support for zone.js 0.14.0 (#51774) | |
add warnings for oversized images and lazy-lcp (#51846) | |
conditional built-in control flow (#51346) | |
create function to assert not running inside reactive context (#52049) | |
drop support for older TypeScript versions (#51792) | |
enable block syntax (#51994) | |
implement deferred block interaction triggers (#51830) | |
implement new block syntax (#51891) | |
implement ɵgetInjectorMetadata debug API (#51900) | |
mark core signal APIs as stable (#51821) | |
Provide a diagnostic for missing Signal invocation in template interpolation. (#49660) | |
Remove deprecated CompilerOptions.useJit andCompilerOptions.missingTranslation . (#49672)
| |
revamp the runtime error message for orphan components to include full component info (#51919) | |
show runtime error for orphan component rendering (#52061) | |
support deferred hover triggers (#51874) | |
support deferred triggers with implicit triggers (#51922) | |
support deferred viewport triggers (#51874) | |
support styles and styleUrl as strings (#51715) | |
support TypeScript 5.2 (#51334) | |
the new list reconciliation algorithm for built-in for (#51980) | |
add rejectErrors option to toSignal (#52474)
| |
adjust toSignal types to handle more common cases (#51991) | |
allow toSignal calls in reactive context (#51831) | |
avoid duplicated code between entry-points (primary, testing, rxjs-interop) (#51500) | |
deferred blocks not removing content immediately when animations are enabled (#51971) | |
disallow afterRender in reactive contexts (#52138)
| |
disallow using effect inside reactive contexts (#52138)
| |
do not remove used ng-template nodes in control flow migration (#52186) | |
drop mutate function from the signals public API (#51821) | |
drop mutate function from the signals public API (#51821) (#51986) | |
effects wait for ngOnInit for their first run (#52473) | |
ensure a consumer drops all its stale producers (#51722) | |
Ensure backwards-referenced transplanted views are refreshed (#51854) | |
framework debug APIs getDependenciesForTokenInInjector and getInjectorMetadata (#51719) | |
guard usages of performance.mark (#52505)
| |
handle aliased index with no space in control flow migration (#52444) | |
handle for alias with as in control flow migration (#52183) | |
handle if alias in control flow migration (#52181) | |
handle trackBy and aliased index in control flow migration (#52423) | |
host directive validation not picking up duplicate directives on component node (#52073) | |
mutation bug in getDependenciesFromInjectable (#52450)
| |
Remove no longer needed build rule related to removed migration (#52143) | |
remove unnecessary migration (#52141) | |
replace assertion with more intentional error (#52427) | |
Respect OnPush change detection strategy for dynamically created components (#51356) | |
run afterRender callbacks outside of the Angular zone (#51385) | |
use TNode instead of LView for mapping injector providers (#52436) | |
viewport trigger deregistering callbacks multiple times (#52115) | |
avoid repeated access to LContainer and trackBy calculation (#52227) | |
avoid unnecessary callbacks in after render hooks (#52292) | |
build-in for should update indexes only when views were added / removed (#52051) | |
cache LiveCollectionLContainerImpl (#52227) | |
chain template instructions (#51546) | |
generate arrow functions for pure function calls (#51668) | |
minimze trackBy calculations (#52227) | |
Update LView consumer to only mark component for check (#52302) | |
deprecate allowing full context object to be replaced in EmbeddedViewRef (#51887)
| |
deprecate the NgProbeToken (#51396)
|
http
Commit | Description |
---|---|
allow customization of the HttpTransferCache. (#52029) | |
Don't override the backend when using the InMemoryWebAPI (#52425) | |
reduce data transfer when using HTTP caching (#52347) |
language-service
Commit | Description |
---|---|
Complete inside @switch (#52153) | |
Enable go to definition of styleUrl (#51746) | |
Implement outlining spans for control flow blocks (#52062) | |
Support autocompletion for blocks (#52121) | |
Autocomplete block keywords in more cases (#52198) |
localize
Commit | Description |
---|---|
ng-add schematics for application builder (#51777) |
migrations
Commit | Description |
---|---|
schematic to remove deprecated CompilerOptions properties (#49672) | |
Schematics for TransferState , StateKey and makeStateKey migration. (#49594)
| |
account for separator characters inside strings (#52525) | |
Add support for nested structures inside a switch statement (#52358) | |
Ensure control flow migration ignores new block syntax (#52402) | |
fix broken migration when no control flow is present (#52399) | |
Fixes a bug in the ngFor pre-v5 alias translation (#52531) | |
Fixes the root level template offset in control flow migration (#52355) | |
handle comma-separated syntax in ngFor (#52525) | |
handle nested classes in block entities migration (#52309) | |
handle nested classes in control flow migration (#52309) | |
handle ngIf else condition with no whitespaces (#52504) | |
Remove unhelpful parsing errors from the log (#52401) | |
Update regex to better match ng-templates (#52529) |
platform-browser
Commit | Description |
---|---|
enable removal of styles on component destroy by default (#51571) | |
expose EventManagerPlugin in the public API. (#49969)
| |
Fire Animations events when using async animations. (#52087) | |
prevent duplicate stylesheets from being created (#52019) | |
set animation properties when using async animations. (#52087) | |
disable styles of removed components instead of removing (#51808) | |
only append style element on creation (#52237) | |
remove withNoDomReuse function (#52057)
|
platform-server
Commit | Description |
---|---|
resolve relative requests URL (#52326) |
router
Commit | Description |
---|---|
Add callback to execute when a view transition is created (#52002) | |
Add feature to support the View Transitions API (#51314) | |
Add option to skip the first view transition (#51825) | |
Allow redirects after an absolute redirect (#51731) | |
children of routes with loadComponent should not inherit parent data by default (#52114) | |
Ensure newly resolved data is inherited by child routes (#52167) | |
Ensure title observable gets latest values (#51561) | |
Remove urlHandlingStrategy from public Router properties (#51631)
| |
Remove deprecated Router properties (#51502) | |
Remove deprecated setupTestingRouter function (#51826) | |
Remove malformedUriErrorHandler from ExtraOptions (#51745)
| |
use DOCUMENT token instead of document directly in view transitions (#51814) |
Breaking Changes
-
Node.js v16 support has been removed and the minimum support version has been bumped to 18.13.0.
Node.js v16 is planned to be End-of-Life on 2023-09-11. Angular will stop supporting Node.js v16 in Angular v17. For Node.js release schedule details, please see: https://github.com/nodejs/release#release-schedule
common
- the NgSwitch directive now defaults to the === equality operator,
migrating from the previously used ==. NgSwitch expressions and / or
individual condition values need adjusting to this stricter equality
check. The added warning message should help pinpointing NgSwitch
usages where adjustements are needed.
core
-
Angular now required
zone.js
version~0.14.0
-
Versions of TypeScript older than 5.2 are no longer supported.
-
The
mutate
method was removed from theWritableSignal
interface and completely
dropped from the public API surface. As an alternative please use the update method and
make immutable changes to the object.Example before:
items.mutate(itemsArray => itemsArray.push(newItem));
Example after:
items.update(itemsArray => [itemsArray, …newItem]);
-
The
mutate
method was removed from theWritableSignal
interface and completely
dropped from the public API surface. As an alternative please use the update method and
make immutable changes to the object.Example before:
items.mutate(itemsArray => itemsArray.push(newItem));
Example after:
items.update(itemsArray => [itemsArray, …newItem]);
-
OnPush
components that are created dynamically now
only have their host bindings refreshed andngDoCheck run
during change
detection if they are dirty.
Previously, a bug in the change detection would result in theOnPush
configuration of dynamically created components to be ignored when
executing host bindings and thengDoCheck
function. This is
rarely encountered but can happen if code has a handle on the
ComponentRef
instance and updates values read in theOnPush
component template without then calling eithermarkForCheck
or
detectChanges
on that component'sChangeDetectorRef
.
platform-browser
-
REMOVE_STYLES_ON_COMPONENT_DESTROY
default value is nowtrue
. This causes CSS of components to be removed from the DOM when destroyed. You retain the previous behaviour by providing theREMOVE_STYLES_ON_COMPONENT_DESTROY
injection token.import {REMOVE_STYLES_ON_COMPONENT_DESTROY} from '@angular/platform-browser'; ... providers: [{ provide: REMOVE_STYLES_ON_COMPONENT_DESTROY, useValue: false, }]
-
The
withNoDomReuse()
function was removed from the public API. If you need to disable hydration, you can exclude theprovideClientHydration()
call from provider list in your application (which would disable hydration features for the entire application) or usengSkipHydration
attribute to disable hydration for particular components. See this guide for additional information: https://angular.io/guide/hydration#how-to-skip-hydration-for-particular-components.
router
-
Absolute redirects no longer prevent further redirects.
Route configurations may need to be adjusted to prevent infinite
redirects where additional redirects were previously ignored after an
absolute redirect occurred. -
Routes with
loadComponent
would incorrectly cause
child routes to inherit their data by default. The default
paramsInheritanceStrategy
isemptyOnly
. If parent data should be
inherited in child routes, this should be manually set toalways
. -
urlHandlingStrategy
has been removed from the Router public API.
This should instead be configured through the provideRouter or RouterModule.forRoot APIs. -
The following Router properties have been removed from
the public API:- canceledNavigationResolution
- paramsInheritanceStrategy
- titleStrategy
- urlUpdateStrategy
- malformedUriErrorHandler
These should instead be configured through the
provideRouter
or
RouterModule.forRoot
APIs. -
The
setupTestingRouter
function has been removed. Use
RouterModule.forRoot
orprovideRouter
to setup theRouter
for
tests instead. -
malformedUriErrorHandler
is no longer available in
theRouterModule.forRoot
options. URL parsing errors should instead be
handled in theUrlSerializer.parse
method.
zone.js
-
Deep and legacy
dist/
imports likezone.js/bundles/zone-testing.js
andzone.js/dist/zone
are no longer allowed.zone-testing-bundle
andzone-testing-node-bundle
are also no longer part of the package.The proper way to import
zone.js
andzone.js/testing
is:import 'zone.js'; import 'zone.js/testing';
Deprecations
animations
- The
AnimationDriver.NOOP
symbol is deprecated, useNoopAnimationDriver
instead.
core
-
ChangeDetectorRef.checkNoChanges
is deprecated.Test code should use
ComponentFixture
instead ofChangeDetectorRef
.
Application code should not callChangeDetectorRef.checkNoChanges
directly. -
Swapping out the context object for
EmbeddedViewRef
is no longer supported. Support for this was introduced with v12.0.0, but
this pattern is rarely used. There is no replacement, but you can use
simple assignments in most cases, orObject.assign , or alternatively still replace the full object by using a
Proxy(see
NgTemplateOutlet`
as an example).Also adds a warning if the deprecated
-
NgProbeToken
The
NgProbeToken
is not used internally since the transition from View Engine to Ivy. The token has no utility and can be removed from applications and libraries.