填寫這份《一分鐘調查》,幫我們(開發組)做得更好!去填寫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">