MCPcopy
hub / github.com/angular/angular / run

Function run

packages/core/src/render3/reactivity/effect.ts:221–233  ·  view source on GitHub ↗
(this: EffectNode)

Source from the content-addressed store, hash-verified

219 zone: null,
220 onDestroyFns: null,
221 run(this: EffectNode): void {
222 if (ngDevMode && isInNotificationPhase()) {
223 throw new Error(`Schedulers cannot synchronously execute watches while scheduling.`);
224 }
225 // We clear `setIsRefreshingViews` so that `markForCheck()` within the body of an effect will
226 // cause CD to reach the component in question.
227 const prevRefreshingViews = setIsRefreshingViews(false);
228 try {
229 runEffect(this);
230 } finally {
231 setIsRefreshingViews(prevRefreshingViews);
232 }
233 },
234
235 cleanup(this: EffectNode): void {
236 if (!this.cleanupFns?.length) {

Callers

nothing calls this directly

Calls 3

isInNotificationPhaseFunction · 0.90
setIsRefreshingViewsFunction · 0.90
runEffectFunction · 0.90

Tested by

no test coverage detected