Home > database >  Angular ngFor in ngFor formControlName : Cannot find control with path
Angular ngFor in ngFor formControlName : Cannot find control with path

Time:10-07

Starting out with Angular and trying to iterate over an array of objects that contain a nested array of objects. StackBlitz link below has all the code and text.

For app.component.html line 6-8 accessing the on line 17 fails.

Error:

Cannot find control with path: 'array -> 0 -> notePartials -> 0'
Cannot find control with path: 'array -> 0 -> notePartials -> 0 -> id'

If you expand the FormGroup printed in the console the data is at value -> array -> 0 -> notePartials -> 0

At a loss for what may be the issue... Displays without issue in a , but when trying to access from an input it fails.

StackBlitz

CodePudding user response:

here is the link for possible solution. I have added all the formcontrols for notePartials object in the form so that you can access them in the html.

  • Related