Used to periodically verify no expressions have changed after they were checked.
API
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 exhaustivecheckNoChanges
on application viewsuseNgZoneOnStable
will use ZoneJS to determine when change detection might have run in an application using ZoneJS to drive change detection. When theNgZone.onStable
would have emitted, all views attached to theApplicationRef
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 viaChangeDetectorRef.detach()
). This is useful because the check that runs after regular change detection does not work for components usingChangeDetectionStrategy.OnPush
. This check is will surface any existing errors hidden byOnPush
components. By default, this check is exhaustive and will always check all views, regardless of their "dirty" state andChangeDetectionStrategy
.
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()
.
@returns
EnvironmentProviders
Jump to details