I\'m trying to push another formbuilder within a formarray but it gives me an error since I think there are no items in the array when initializing the code, hence there are
You can use ['controls'] instead of .controls, as below:
(this.loanTypeForm.controls['frequency']).controls[index]['controls']['settings'].push(...)
But in order to simplify and provide more readability I'd suggest you to change it all to:
const control = this.loanTypeForm.get(`frequency.${index}.settings`) as FormArray;
control.push(...);