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

Method onDestroy

packages/core/src/linker/destroy_ref.ts:87–92  ·  view source on GitHub ↗
(callback: () => void)

Source from the content-addressed store, hash-verified

85 }
86
87 override onDestroy(callback: () => void): () => void {
88 const lView = this._lView;
89
90 storeLViewOnDestroy(lView, callback);
91 return () => removeLViewOnDestroy(lView, callback);
92 }
93}
94
95function injectDestroyRef(): DestroyRef {

Callers

nothing calls this directly

Calls 2

storeLViewOnDestroyFunction · 0.90
removeLViewOnDestroyFunction · 0.90

Tested by

no test coverage detected