MCPcopy Index your code
hub / github.com/angular/components / ngOnDestroy

Method ngOnDestroy

src/cdk/table/table.ts:691–719  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

689 }
690
691 ngOnDestroy() {
692 this._stickyStyler?.destroy();
693
694 [
695 this._rowOutlet?.viewContainer,
696 this._headerRowOutlet?.viewContainer,
697 this._footerRowOutlet?.viewContainer,
698 this._cachedRenderRowsMap,
699 this._customColumnDefs,
700 this._customRowDefs,
701 this._customHeaderRowDefs,
702 this._customFooterRowDefs,
703 this._columnDefsByName,
704 ].forEach((def: ViewContainerRef | Set<unknown> | Map<unknown, unknown> | undefined) => {
705 def?.clear();
706 });
707
708 this._headerRowDefs = [];
709 this._footerRowDefs = [];
710 this._defaultRowDef = null;
711 this._headerRowStickyUpdates.complete();
712 this._footerRowStickyUpdates.complete();
713 this._onDestroy.next();
714 this._onDestroy.complete();
715
716 if (isDataSource(this.dataSource)) {
717 this.dataSource.disconnect(this);
718 }
719 }
720
721 /**
722 * Renders rows based on the table's latest set of data, which was either provided directly as an

Callers

nothing calls this directly

Calls 5

isDataSourceFunction · 0.90
destroyMethod · 0.65
clearMethod · 0.65
nextMethod · 0.45
disconnectMethod · 0.45

Tested by

no test coverage detected