mirror of
https://github.com/angular/angular.git
synced 2026-09-14 13:54:52 +08:00
ca44055166
The previous documentation for `DoCheck` / `ngDoCheck` implied that the default change-detector had run on the directive itself, which is misleading. `ngDoCheck` is actually invoked when the *parent's* change-detector checks the directive's input bindings — meaning it fires even for `OnPush` components whose own change detection was skipped. Updated three places in lifecycle_hooks.ts: - Interface description: scopes "the check" to input bindings in the parent template and adds an explicit OnPush callout. - "detects changes" clarified to "detects changes to the directive's input bindings". - Method description: "after the default change-detector runs" → "after the default change-detector has checked the directive's input bindings in the parent template". Fixes #48140