MCPcopy Create free account
hub / github.com/angular/components / _detachContent

Method _detachContent

src/cdk/overlay/overlay-ref.ts:555–570  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

553 }
554
555 private _detachContent() {
556 // Needs a couple of checks for the pane and host, because
557 // they may have been removed by the time the zone stabilizes.
558 if (!this._pane || !this._host || this._pane.children.length === 0) {
559 if (this._pane && this._config.panelClass) {
560 this._toggleClasses(this._pane, this._config.panelClass, false);
561 }
562
563 if (this._host && this._host.parentElement) {
564 this._previousHostParent = this._host.parentElement;
565 this._host.remove();
566 }
567
568 this._completeDetachContent();
569 }
570 }
571
572 private _completeDetachContent() {
573 this._detachContentAfterRenderRef?.destroy();

Callers 1

Calls 3

_toggleClassesMethod · 0.95
removeMethod · 0.65

Tested by

no test coverage detected