mirror of
https://github.com/angular/angular
synced 2026-05-24 09:28:37 +00:00
parent
8a42f27d1e
commit
78ae490e0a
1 changed files with 1 additions and 1 deletions
|
|
@ -11,7 +11,7 @@ If you are confident that a part of the application is not affected by a state c
|
|||
|
||||
OnPush change detection instructs Angular that to only run change detection automatically for a component subtree when:
|
||||
* The root component of the subtree receives new inputs as the result of a template binding. Angular compares the current and past value of the input with `==`
|
||||
* Angular handles an event within the component with OnPush change detection
|
||||
* Angular handles an event _(e.g. using event binding, output binding, or `@HostListener`)_ in the subtree's root component or any of its children wether they are using OnPush change detection or not.
|
||||
|
||||
You can set the change detection strategy of a component to `OnPush` in the `@Component` decorator:
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue