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

RangeValueAccessor

ControlValueAccessor 用于写入范围输入器的值,并监听范围输入器的变化。它被 FormControlDirectiveFormControlNameNgModel 使用。

The ControlValueAccessor for writing a range value and listening to range input changes. The value accessor is used by the FormControlDirective, FormControlName, and NgModel directives.

Exported from

选择器

说明

使用带响应式表单的范围输入器

Using a range input with a reactive form

以下示例显示了如何在响应式表单中使用范围输入器。

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

      
      const ageControl = new FormControl();
    
      
      <input type="range" [formControl]="ageControl">