MCPcopy Index your code
hub / github.com/angular/angular / _applyFormState

Method _applyFormState

packages/forms/src/model/form_control.ts:595–604  ·  view source on GitHub ↗
(formState: FormControlState<TValue> | TValue)

Source from the content-addressed store, hash-verified

593 }
594
595 private _applyFormState(formState: FormControlState<TValue> | TValue) {
596 if (isFormControlState(formState)) {
597 (this as Writable<this>).value = this._pendingValue = formState.value;
598 formState.disabled
599 ? this.disable({onlySelf: true, emitEvent: false})
600 : this.enable({onlySelf: true, emitEvent: false});
601 } else {
602 (this as Writable<this>).value = this._pendingValue = formState;
603 }
604 }
605};
606
607interface UntypedFormControlCtor {

Callers 2

constructorMethod · 0.95
resetMethod · 0.95

Calls 3

enableMethod · 0.80
isFormControlStateFunction · 0.70
disableMethod · 0.45

Tested by

no test coverage detected