Cookies concent notice

This site uses cookies from Google to deliver its services and to analyze traffic.
Learn more
Skip to main content
This site is no longer updated.Head to Angular.devHome
/

This is the archived documentation for Angular v17. Please visit angular.dev to see this page for the current version of Angular.

ChangeDetectionStrategy

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

See also

      
      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.