MCPcopy Index your code
hub / github.com/angular/angular / shouldTriggerDeferBlock

Function shouldTriggerDeferBlock

packages/core/src/defer/rendering.ts:493–506  ·  view source on GitHub ↗
(triggerType: TriggerType, lView: LView)

Source from the content-addressed store, hash-verified

491 * Determines whether we should proceed with triggering a given defer block.
492 */
493export function shouldTriggerDeferBlock(triggerType: TriggerType, lView: LView): boolean {
494 // prevents triggering regular triggers when on the server.
495 if (triggerType === TriggerType.Regular && typeof ngServerMode !== 'undefined' && ngServerMode) {
496 return false;
497 }
498
499 // prevents triggering in the case of a test run with manual defer block configuration.
500 const injector = lView[INJECTOR];
501 const config = injector.get(DEFER_BLOCK_CONFIG, null, {optional: true});
502 if (config?.behavior === DeferBlockBehavior.Manual) {
503 return false;
504 }
505 return true;
506}

Callers 3

registerDomTriggerFunction · 0.90
scheduleDelayedTriggerFunction · 0.90
triggerDeferBlockFunction · 0.90

Calls 1

getMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…