从角度开始,尝试迭代包含嵌套对象数组的对象数组。下面的StackBlitz链接有所有的代码和文本。
对于app.component.html,第6-8行访问第17行失败。
错误:
Cannot find control with path: 'array -> 0 -> notePartials -> 0'
Cannot find control with path: 'array -> 0 -> notePartials -> 0 -> id'
如果展开控制台中打印的FormGroup,则数据位于值->数组-> 0 -> notePartials -> 0。
不知是什么问题.中不显示问题,但当尝试从输入访问时,它将失败。
发布于 2022-10-06 05:31:22
以下是可能的解决方案的链接。我在表单中添加了notePartials对象的所有窗体控件,以便您可以在html中访问它们。
https://stackoverflow.com/questions/73967388
复制相似问题