MCPcopy Create free account
hub / github.com/angular/angular / run

Function run

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

Source from the content-addressed store, hash-verified

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