I have a formArray that's a list where you can add, edit and delete. Everything works fine but I would like to set the initial value for the first two itmes. It works fine for the input value but my mat-autocomplete is not populating correctly. here is the stackblitz.
.TS FILE
initItems() {
var formArray = this.fb.array([]);
for (let i = 0; i < 2; i++) {
formArray.push(
this.fb.group({
unititem: ['syed', [Validators.required]],
age: ['14', [Validators.required]]
})
);
}
return formArray;
}