docs: remove references to CheckAlways and CheckOnce (#42300)
Fixes #29751 PR Close #42300
This commit is contained in:
parent
d15a6a3a71
commit
1955dbb048
|
@ -156,10 +156,10 @@ The change detector is responsible for updating the view to reflect the current
|
|||
Similarly, the user can interact with the UI, causing events that change the state of the data model.
|
||||
These events can trigger change detection.
|
||||
|
||||
Using the default ("CheckAlways") change-detection strategy, the change detector goes through the [view hierarchy](#view-tree) on each VM turn to check every [data-bound property](#data-binding) in the template. In the first phase, it compares the current state of the dependent data with the previous state, and collects changes.
|
||||
Using the default change-detection strategy, the change detector goes through the [view hierarchy](#view-tree) on each VM turn to check every [data-bound property](#data-binding) in the template. In the first phase, it compares the current state of the dependent data with the previous state, and collects changes.
|
||||
In the second phase, it updates the page DOM to reflect any new data values.
|
||||
|
||||
If you set the `OnPush` ("CheckOnce") change-detection strategy, the change detector runs only when [explicitly invoked] (api/core/ChangeDetectorRef), or when it is triggered by an `Input` reference change or event handler. This typically improves performance. For more information, see [Optimize Angular's change detection](https://web.dev/faster-angular-change-detection/).
|
||||
If you set the `OnPush` change-detection strategy, the change detector runs only when [explicitly invoked] (api/core/ChangeDetectorRef), or when it is triggered by an `Input` reference change or event handler. This typically improves performance. For more information, see [Optimize Angular's change detection](https://web.dev/faster-angular-change-detection/).
|
||||
|
||||
{@a class-decorator}
|
||||
|
||||
|
|
|
@ -400,7 +400,7 @@ The asynchronous method sends an HTTP request, and returns an observable that em
|
|||
As shown in the previous section, you can use the impure `AsyncPipe` to accept an observable as input and subscribe to the input automatically.
|
||||
You can also create an impure pipe to make and cache an HTTP request.
|
||||
|
||||
Impure pipes are called whenever change detection runs for a component, which could be every few milliseconds for `CheckAlways`.
|
||||
Impure pipes are called whenever change detection runs for a component, which could be as often as every few milliseconds.
|
||||
To avoid performance problems, call the server only when the requested URL changes, as shown in the following example, and use the pipe to cache the server response.
|
||||
The tabs show the following:
|
||||
|
||||
|
|
Loading…
Reference in New Issue