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

Function ɵɵdeferOnImmediate

packages/core/src/defer/instructions.ts:430–448  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

428 * @codeGenApi
429 */
430export function ɵɵdeferOnImmediate() {
431 const lView = getLView();
432 const tNode = getCurrentTNode()!;
433
434 if (ngDevMode) {
435 trackTriggerForDebugging(lView[TVIEW], tNode, 'on immediate');
436 }
437
438 if (!shouldAttachTrigger(TriggerType.Regular, lView, tNode)) return;
439
440 // Render placeholder block only if loading template is not present and we're on
441 // the client to avoid content flickering, since it would be immediately replaced
442 // by the loading block.
443 const tDetails = getTDeferBlockDetails(lView[TVIEW], tNode);
444 if (tDetails.loadingTmplIndex === null) {
445 renderPlaceholder(lView, tNode);
446 }
447 triggerDeferBlock(TriggerType.Regular, lView, tNode);
448}
449
450/**
451 * Sets up logic to handle the `prefetch on immediate` deferred trigger.

Callers

nothing calls this directly

Calls 7

getLViewFunction · 0.90
getCurrentTNodeFunction · 0.90
trackTriggerForDebuggingFunction · 0.90
shouldAttachTriggerFunction · 0.90
getTDeferBlockDetailsFunction · 0.90
renderPlaceholderFunction · 0.90
triggerDeferBlockFunction · 0.90

Tested by

no test coverage detected