MCPcopy Create free account
hub / github.com/angular/angular / onDestroy

Method onDestroy

packages/core/src/di/r3_injector.ts:300–304  ·  view source on GitHub ↗
(callback: () => void)

Source from the content-addressed store, hash-verified

298 }
299
300 override onDestroy(callback: () => void): () => void {
301 assertNotDestroyed(this);
302 this._onDestroyHooks.push(callback);
303 return () => this.removeOnDestroy(callback);
304 }
305
306 // 3p-only-start
307 override runInContext<ReturnT>(fn: () => ReturnT): ReturnT {

Callers

nothing calls this directly

Calls 3

removeOnDestroyMethod · 0.95
assertNotDestroyedFunction · 0.85
pushMethod · 0.45

Tested by

no test coverage detected