dynamic formGroup within formArray using formBuilder angular 2
问题 I have an array on my backend called media that stores several objects. It looks something like this: "media": [ { "srcId": null; "primary": false, "thumbs": { "default": null }, "type": null, "raw": null } ] My edit-component.ts for the loading this array into the form looks like this: media: this._fb.array([ this._fb.group({ srcId: new FormControl(this.existingMedia.srcId), type: new FormControl(this.existingMedia.type), raw: new FormControl(this.existingMedia.raw), primary: new FormControl