ChangeDetectionStrategy

From Get docs
< @angular/coreAngular/docs/8/api/core/changedetectionstrategy


ChangeDetectionStrategy

enum

The strategy that the default change detector uses to detect changes. When set, takes effect the next time change detection is triggered.

enum ChangeDetectionStrategy {
  OnPush: 0
  Default: 1
}

Members

Member Description
OnPush: 0 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.
Default: 1 Use the default CheckAlways strategy, in which change detection is automatic until explicitly deactivated.


© 2010–2020 Google, Inc.
Licensed under the Creative Commons Attribution License 4.0.
https://v8.angular.io/api/core/ChangeDetectionStrategy