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

Method stopMonitoring

src/cdk/text-field/autofill.ts:130–141  ·  view source on GitHub ↗
(elementOrRef: Element | ElementRef<Element>)

Source from the content-addressed store, hash-verified

128 stopMonitoring(element: ElementRef<Element>): void;
129
130 stopMonitoring(elementOrRef: Element | ElementRef<Element>): void {
131 const element = coerceElement(elementOrRef);
132 const info = this._monitoredElements.get(element);
133
134 if (info) {
135 info.unlisten();
136 info.subject.complete();
137 element.classList.remove('cdk-text-field-autofill-monitored');
138 element.classList.remove('cdk-text-field-autofilled');
139 this._monitoredElements.delete(element);
140 }
141 }
142
143 ngOnDestroy() {
144 this._monitoredElements.forEach((_info, element) => this.stopMonitoring(element));

Callers 15

ngOnDestroyMethod · 0.95
ngOnDestroyMethod · 0.45
ngOnDestroyMethod · 0.45
ngOnDestroyMethod · 0.45
ngOnDestroyMethod · 0.45
ngOnDestroyMethod · 0.45
ngOnDestroyMethod · 0.45
ngOnDestroyMethod · 0.45
ngOnDestroyMethod · 0.45
ngOnDestroyMethod · 0.45
ngOnDestroyMethod · 0.45
menu.spec.tsFile · 0.45

Calls 4

coerceElementFunction · 0.90
getMethod · 0.65
removeMethod · 0.65
deleteMethod · 0.65

Tested by

no test coverage detected