美文网首页
angular4 formControl disabled表单提

angular4 formControl disabled表单提

作者: ningzuokun | 来源:发表于2017-11-01 10:48 被阅读0次

应用场景

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表单提

      本文链接:https://www.haomeiwen.com/subject/ojpwpxtx.html