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

Method select

src/material/core/option/option.ts:166–175  ·  view source on GitHub ↗

Selects the option.

(emitEvent = true)

Source from the content-addressed store, hash-verified

164
165 /** Selects the option. */
166 select(emitEvent = true): void {
167 if (!this._selected) {
168 this._selected = true;
169 this._changeDetectorRef.markForCheck();
170
171 if (emitEvent) {
172 this._emitSelectionChangeEvent();
173 }
174 }
175 }
176
177 /** Deselects the option. */
178 deselect(emitEvent = true): void {

Callers

nothing calls this directly

Calls 2

markForCheckMethod · 0.80

Tested by

no test coverage detected