()
| 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 |
no test coverage detected