[ Web Proxy ]
URL:
Viewing: https://angular.dev/api/forms/NumberValueAccessor [Back]  [Original]

NumberValueAccessor Angular Skip to main content
menu
close
more_horiz
menuAPI
@angular/forms

NumberValueAccessor

directive
stable

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.

On this page

    arrow_upward_alt Back to the top

    API

        
          class NumberValueAccessor extends BuiltInControlValueAccessor implements ControlValueAccessor {}
        
        

    Description

    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 by

    Usage Notes

    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">
    Jump to details

    Web Proxy Viewer  |  New URL  |  Original Page