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

Method _initializeSelection

src/material/select/select.ts:1021–1032  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1019 }
1020
1021 private _initializeSelection(): void {
1022 // Defer setting the value in order to avoid the "Expression
1023 // has changed after it was checked" errors from Angular.
1024 Promise.resolve().then(() => {
1025 if (this.ngControl) {
1026 this._value = this.ngControl.value;
1027 }
1028
1029 this._setSelectionByValue(this._value);
1030 this.stateChanges.next();
1031 });
1032 }
1033
1034 /**
1035 * Sets the selected option based on a value. If no option can be

Callers 2

compareWithMethod · 0.95
ngAfterContentInitMethod · 0.95

Calls 3

_setSelectionByValueMethod · 0.95
resolveMethod · 0.80
nextMethod · 0.45

Tested by

no test coverage detected