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

NumberValueAccessor

用于写入数字值和监听数字输入框更改的 ControlValueAccessor。这个值访问器由 FormControlDirectiveFormControlNameNgModel 指令使用。

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

Exported from

选择器

说明

将数字输入框与响应式表单一起使用。

Using a number input with a reactive form.

下面的示例演示了如何将数字输入框与响应式表单一起使用。

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

      
      const totalCountControl = new FormControl();
    
      
      <input type="number" [formControl]="totalCountControl">