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

Method destroy

packages/core/src/render3/ng_module_ref.ts:88–94  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

86 }
87
88 override destroy(): void {
89 ngDevMode && assertDefined(this.destroyCbs, 'NgModule already destroyed');
90 const injector = this._r3Injector;
91 !injector.destroyed && injector.destroy();
92 this.destroyCbs!.forEach((fn) => fn());
93 this.destroyCbs = null;
94 }
95 override onDestroy(callback: () => void): void {
96 ngDevMode && assertDefined(this.destroyCbs, 'NgModule already destroyed');
97 this.destroyCbs!.push(callback);

Callers

nothing calls this directly

Calls 4

assertDefinedFunction · 0.90
destroyMethod · 0.65
fnFunction · 0.50
forEachMethod · 0.45

Tested by

no test coverage detected