MCPcopy Index your code
hub / github.com/angular/components / _initializeSelection

Method _initializeSelection

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

Source from the content-addressed store, hash-verified

1017 }
1018
1019 private _initializeSelection(): void {
1020 // Defer setting the value in order to avoid the "Expression
1021 // has changed after it was checked" errors from Angular.
1022 Promise.resolve().then(() => {
1023 if (this.ngControl) {
1024 this._value = this.ngControl.value;
1025 }
1026
1027 this._setSelectionByValue(this._value);
1028 this.stateChanges.next();
1029 });
1030 }
1031
1032 /**
1033 * 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