How to create custom form components in Angular with ControlValueAccessor

Описание к видео How to create custom form components in Angular with ControlValueAccessor

Demystify the ControlValueAccessor interface! In this video I cover how you can make your Angular components usable with ngModel and formControl by implementing the ControlValueAccessor interface.

This technique comes in handy when you want to create a custom form control, make your components more reusable, or when you want to break apart large forms into sub components.

I cover some of the theory behind the interface, walk through a specific example of making a pre-existing component work within an Angular form, and point out some common pitfalls you may run into.

0:00 - Introduction
0:45 - What is ControlValueAccessor?
1:35 - When you would use it
4:37 - Component values
6:26 - Code: Implementing the interface
16:50 - Code: Registering with the Injector
19:32 - Wrapup

Комментарии

Информация по комментариям в разработке