0Pricing
Angular Academy · Lesson

The ControlValueAccessor Interface

Connect a custom widget to Angular forms.

Why Custom Controls

Angular forms work with native inputs out of the box. To make your own component (a rating widget, color picker, toggle) usable with ngModel and formControlName, it must implement ControlValueAccessor.

The Bridge

ControlValueAccessor (CVA) is the bridge between Angular's form model and your component's view. It defines how the model writes values in and how user changes flow back out.

All lessons in this course

  1. The ControlValueAccessor Interface
  2. Writing and Registering Values
  3. Handling Disabled and Touched States
  4. Validation in Custom Controls
← Back to Angular Academy