angular4 formControl disabled表单提交获取不到值

应用场景

const ctrl = new FormControl({value: 'n/a', disabled: true});

通过 FormGroup getRawValue方法,可以获取包含disabled值

官方文档描述

/**

* The aggregate value of the{@linkFormGroup}, including any disabled controls.

*

* If you'd like to include all values regardless of disabled status, use this method.

* Otherwise, the `value` property is the best way to get the value of the group.

*/

你可能感兴趣的:(angular4 formControl disabled表单提交获取不到值)