I am trying to set the initial value for an angular 2 reactive form formArray object.
Even though the json object used to set the form value contains an array value with multiple entries, only the first entry is shown and the "form.value" also only shows the first entry.
I am using the syntax (<FormGroup>this.myForm).patchValue(value, { onlySelf: true });
to set the initial value on the form.
Here is a plunker demonstrating the issue: https://plnkr.co/edit/j1S80CmPBF1iHI5ViEia?p=preview
I used the example from https://scotch.io/tutorials/how-to-build-nested-model-driven-forms-in-angular-2 to create the plunker.
Any ideas what I've done wrong?
myForm
with theFormArray
that consists of oneFormGroup
. I assume this is the reason another address gets ignored. – Tera