Angular 2 Form “Cannot find control with path”

前端 未结 5 1510
无人共我
无人共我 2020-11-30 03:36

I try to make a dynamic form (so you can limitless add items to a list), but somehow the content of my list is not getting send because it can\'t find the control with path:

5条回答
  •  生来不讨喜
    2020-11-30 04:16

    There should be a formControlName in your HTML form mapped to your component file.

    {{i + 1}}.)
    list_items: this.fb.array([
        [''], //0 points to this
        [''], //1 points to this
        [''] //2 points to this
    ])
    

提交回复
热议问题