/
githubmirror
/
angular
Обзор
Документация
Войти
/
githubmirror
/
angular
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
packages/core/src/change_detection/constants.ts
44 строки
1 KB
Kristiyan Kostadinov
fix(core): update comment for Default change detection
09 июн 2026, 23:09
09 июн 2026, 23:09
5829177
Код
Авторство
О чём код?
/** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.dev/license */ /** * The strategy that the default change detector uses to detect changes. * When set, takes effect the next time change detection is triggered. * * @see {@link /api/core/ChangeDetectorRef?tab=usage-notes Change detection usage} * @see {@link /best-practices/skipping-subtrees Skipping component subtrees} * * @publicApi */ export enum ChangeDetectionStrategy { /** * Use the `CheckOnce` strategy, meaning that automatic change detection is deactivated * until reactivated by setting the strategy to `Default` (`CheckAlways`). * Change detection can still be explicitly invoked. * This strategy applies to all child directives and cannot be overridden. * * NOTE: OnPush is enabled by default. */ OnPush = 0, /** * Use the `Eager` strategy, meaning that the component is checked eagerly when the change * detection traversal reaches it, rather than only checking under certain circumstances (e.g. * `markForCheck`, a signal in the template changed, etc). */ Eager = 1, /** * This value is equivalent to setting `Eager` and is due to be removed. * @deprecated Use `Eager` instead. */ // 3p-only-start // tslint:disable-next-line:no-duplicate-enum-values Default = 1, // 3p-only-end }