• 개요
@angular/forms

NumberValueAccessor

디렉티브
안정화

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.

API

    
      class NumberValueAccessor extends BuiltInControlValueAccessor implements ControlValueAccessor {}
    
    

설명

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.

다음 모듈에서 내보냄

사용 시 참고사항

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">
상세 내용으로 이동