• Overview
@angular/core

provideExperimentalCheckNoChangesForDebug

function

Used to periodically verify no expressions have changed after they were checked.

  
    function provideExperimentalCheckNoChangesForDebug(  options: { interval?: number | undefined; useNgZoneOnStable?: boolean | undefined; exhaustive?: boolean | undefined; }): EnvironmentProviders;
  
  

provideExperimentalCheckNoChangesForDebug

Used to periodically verify no expressions have changed after they were checked.

@paramoptions{ interval?: number | undefined; useNgZoneOnStable?: boolean | undefined; exhaustive?: boolean | undefined; }

Used to configure when the check will execute.

  • interval will periodically run exhaustive checkNoChanges on application views
  • useNgZoneOnStable will use ZoneJS to determine when change detection might have run in an application using ZoneJS to drive change detection. When the NgZone.onStable would have emitted, all views attached to the ApplicationRef are checked for changes.
  • 'exhaustive' means that all views attached to ApplicationRef and all the descendants of those views will be checked for changes (excluding those subtrees which are detached via ChangeDetectorRef.detach()). This is useful because the check that runs after regular change detection does not work for components using ChangeDetectionStrategy.OnPush. This check is will surface any existing errors hidden by OnPush components. By default, this check is exhaustive and will always check all views, regardless of their "dirty" state and ChangeDetectionStrategy.

When the useNgZoneOnStable option is true, this function will provide its own NgZone implementation and needs to come after any other NgZone provider, including provideZoneChangeDetection() and provideExperimentalZonelessChangeDetection().

Jump to details