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 826c98e50c
commit d2d98dad61

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});