MCPcopy
hub / github.com/angular/angular / destroy

Method destroy

packages/core/src/resource/resource.ts:396–409  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

394 }
395
396 destroy(): void {
397 this.destroyed = true;
398 this.unregisterOnDestroy();
399 this.effectRef.destroy();
400 this.abortInProgressLoad();
401
402 // Destroyed resources enter Idle state.
403 this.state.set({
404 extRequest: {request: undefined, reload: 0},
405 status: 'idle',
406 previousStatus: 'idle',
407 stream: undefined,
408 });
409 }
410
411 private async loadEffect(): Promise<void> {
412 const extRequest = this.extRequest();

Callers 1

constructorMethod · 0.95

Calls 3

abortInProgressLoadMethod · 0.95
destroyMethod · 0.65
setMethod · 0.65

Tested by

no test coverage detected