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

Method ngOnDestroy

src/material/button-toggle/button-toggle.ts:721–731  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

719 }
720
721 ngOnDestroy() {
722 const group = this.buttonToggleGroup;
723
724 this._focusMonitor.stopMonitoring(this._elementRef);
725
726 // Remove the toggle from the selection once it's destroyed. Needs to happen
727 // on the next tick in order to avoid "changed after checked" errors.
728 if (group && group._isSelected(this)) {
729 group._syncButtonToggle(this, false, false, true);
730 }
731 }
732
733 /** Focuses the button. */
734 focus(options?: FocusOptions): void {

Callers

nothing calls this directly

Calls 3

_syncButtonToggleMethod · 0.80
stopMonitoringMethod · 0.45
_isSelectedMethod · 0.45

Tested by

no test coverage detected