填写这份《一分钟调查》,帮我们(开发组)做得更好!去填写Home

CheckboxControlValueAccessor

一个 ControlValueAccessor,用于写入值并监听复选框输入元素上的更改。

A ControlValueAccessor for writing a value and listening to changes on a checkbox input element.

Exported from

选择器

说明

使用带有响应式表单的复选框。

Using a checkbox with a reactive form.

以下示例显示了如何将复选框与响应式表单一起使用。

The following example shows how to use a checkbox with a reactive form.

      
      const rememberLoginControl = new FormControl();
    
      
      <input type="checkbox" [formControl]="rememberLoginControl">