FormArray vs FormGroup

The important distinction between FormGroup and FormArray is that the data of the later serialized as an array

(unlike being serialized as an object in the case of FormGroup).

The classic example of when we need to retrieve the data as an array, you don’t know beforehand how many controls will be kept around the group, for instance, dynamic forms.

updatedupdated2024-01-172024-01-17