From 5b9b740c20a5389d9684cf7ccb02175755038319 Mon Sep 17 00:00:00 2001 From: JoostK Date: Sat, 2 Oct 2021 22:16:21 +0200 Subject: [PATCH] docs: include `WrappedValue` as removed API on deprecation page (#43685) A rebase of #43507 seems to have inadvertently dropped the note about the removed `WrappedValue` API from the deprecations page, so this commit reintroduces the text. PR Close #43685 --- aio/content/guide/deprecations.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/aio/content/guide/deprecations.md b/aio/content/guide/deprecations.md index 4b1d6ea5fc9..f5ad95193e1 100644 --- a/aio/content/guide/deprecations.md +++ b/aio/content/guide/deprecations.md @@ -704,6 +704,18 @@ Find more information about the replacement in the [`LoadChildrenCallback` docum The supporting classes `NgModuleFactoryLoader`, `SystemJsNgModuleLoader` and `SystemJsNgModuleLoaderConfig` classes were removed from `@angular/core`, as well as `SpyNgModuleFactoryLoader` from `@angular/router`. +### `WrappedValue` + +The purpose of `WrappedValue` was to allow the same object instance to be treated as different for the purposes of change detection. +It was commonly used with the `async` pipe in the case where the `Observable` produces the same instance of the value. + +Given that this use case is relatively rare and special handling impacted application performance, the `WrappedValue` API has been removed in Angular 13. + +If you rely on the behavior that the same object instance should cause change detection, you have two options: + +- Clone the resulting value so that it has a new identity. +- Explicitly call [`ChangeDetectorRef.detectChanges()`](api/core/ChangeDetectorRef#detectchanges) to force the update. + [AioGuideI18nCommonMergeDefineLocalesInTheBuildConfiguration]: guide/i18n-common-merge#define-locales-in-the-build-configuration "Define locales in the build configuration - Common Internationalization task #6: Merge translations into the application | Angular"