From 78ae490e0a3010406950cdaddc021f74e2fba4a9 Mon Sep 17 00:00:00 2001 From: Younes Jaaidi Date: Thu, 9 Jun 2022 04:47:29 +0200 Subject: [PATCH] docs: clarify OnPush (#46314) PR Close #46314 --- aio/content/guide/change-detection-skipping-subtrees.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/aio/content/guide/change-detection-skipping-subtrees.md b/aio/content/guide/change-detection-skipping-subtrees.md index 3426e05af49..6919b274a20 100644 --- a/aio/content/guide/change-detection-skipping-subtrees.md +++ b/aio/content/guide/change-detection-skipping-subtrees.md @@ -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: