Angular | ControlValueAccessor to non native Input

Viewed 24

Is it possible to make a custom form control with ControlValueAccessor in Angular NOT using native element of the DOM (like input, textarea, radio button), but using plain div and span? I Have wandered Google in search of the answer to this particular question, but no luck unfortunately.

1 Answers

ControlValueAccessor is just an interface used by angular forms to interact with your custom control and vice versa.

Therfore, your contol can be anything - and image(huh?), video(rly?), raw socket stream (thats reasonable), anything you can imagine - as long as it interacts with the form via that particular interface.

Related