MCPcopy Create free account
hub / github.com/angular/angular / ɵɵdeferPrefetchOnTimer

Function ɵɵdeferPrefetchOnTimer

packages/core/src/defer/instructions.ts:526–537  ·  view source on GitHub ↗
(delay: number)

Source from the content-addressed store, hash-verified

524 * @codeGenApi
525 */
526export function ɵɵdeferPrefetchOnTimer(delay: number) {
527 const lView = getLView();
528 const tNode = getCurrentTNode()!;
529
530 if (ngDevMode) {
531 trackTriggerForDebugging(lView[TVIEW], tNode, `prefetch on timer(${delay}ms)`);
532 }
533
534 if (!shouldAttachTrigger(TriggerType.Prefetch, lView, tNode)) return;
535
536 scheduleDelayedPrefetching(onTimer(delay));
537}
538
539/**
540 * Creates runtime data structures for the `on timer` hydrate trigger.

Callers

nothing calls this directly

Calls 6

getLViewFunction · 0.90
getCurrentTNodeFunction · 0.90
trackTriggerForDebuggingFunction · 0.90
shouldAttachTriggerFunction · 0.90
onTimerFunction · 0.90

Tested by

no test coverage detected