docs(forms): Added FormControl initialization information (#11948)

This commit is contained in:
Florian Kinder 2016-09-28 22:59:08 +02:00 committed by Chuck Jazdzewski
parent 1564042fe8
commit 36bc2ff269

View File

@ -625,6 +625,8 @@ export abstract class AbstractControl {
* *
* You can also initialize the control with a form state object on instantiation, * You can also initialize the control with a form state object on instantiation,
* which includes both the value and whether or not the control is disabled. * which includes both the value and whether or not the control is disabled.
* You can't use the value key without the disabled key; both are required
* to use this way of initialization.
* *
* ```ts * ```ts
* const ctrl = new FormControl({value: 'n/a', disabled: true}); * const ctrl = new FormControl({value: 'n/a', disabled: true});