A few months ago I wrote a post about Angular’s “dynamic forms pattern”, on that post I just reviewed the reactive form API and tried to explain the concept of using it dynamically by iterating a predefined descriptor.

That post had quite a lot of views and over time I had to update one of the examples I used for nested form groups since I recently think of it as an anti-pattern…

If you’re not familiar with the ControlValueAccessor interface — go and check it out.

By using it you can refer to your component as a form control — and use the “formControlName” directive in order to wire it to your form group, and get an update upon any change it goes (and vice versa).

you’re welcome to play with the following live example and review my previous post which is now updated.

Cheers,

Liron.