ngFor not updating when pushing new data

Viewed 1374

I have a set of reactive forms that I'm setting up as an array of reactive forms:

typesForms: FormGroup[] = [];

Which I loop through in my html:

<form *ngFor="let type of typesForms; let i = index" [formGroup]="typesForms[i]" class="row">

However, when I push a new form, the HTML doesn't update.

this.typesForms.push(this.formBuilder.group({
    type: { value: data['type'], disabled: true }
}));

I've logged out the resulting data, and it shows the new form object, but nothing on the front end. I assume this has something to do with reactive forms, but I'm not sure if I'm screwing something else up.

1 Answers
Related