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

Function storeLViewOnDestroy

packages/core/src/render3/util/view_utils.ts:285–296  ·  view source on GitHub ↗
(lView: LView, onDestroyCallback: () => void)

Source from the content-addressed store, hash-verified

283 * Stores a LView-specific destroy callback.
284 */
285export function storeLViewOnDestroy(lView: LView, onDestroyCallback: () => void) {
286 if (isDestroyed(lView)) {
287 throw new RuntimeError(
288 RuntimeErrorCode.VIEW_ALREADY_DESTROYED,
289 ngDevMode && 'View has already been destroyed.',
290 );
291 }
292 if (lView[ON_DESTROY_HOOKS] === null) {
293 lView[ON_DESTROY_HOOKS] = [];
294 }
295 lView[ON_DESTROY_HOOKS].push(onDestroyCallback);
296}
297
298/**
299 * Removes previously registered LView-specific destroy callback.

Callers 5

onDestroyMethod · 0.90
onDestroyMethod · 0.90
createComponentRefMethod · 0.90
ɵɵdeferFunction · 0.90
pollDomTriggerFunction · 0.90

Calls 2

isDestroyedFunction · 0.90
pushMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…