我正在尝试使用FormArray插入多个文件。控制台中的错误显示错误TS7053:元素隐式具有'any‘类型,因为“controls”类型的表达式不能用于索引类型'AbstractControl<(string )[],(String2000nullmatStepLabel>Fill out your name</ng-template>&
我试图使用这段代码生成一个深层次嵌套的反应性表单,我在这个站点中找到了这个表单:Property 'controls' does not exist on type 'AbstractControlconst control = <FormArray>this.survey.get('sections').controls[j].get('questions');
const control =<FormArray>th
我正在尝试构建一个有角度的表单,这样用户就可以在表中输入数字。行数和列数可以不同(nRows、nColumns),但用户不能编辑。预期结果应该如下所示:
对于我使用的行,FormArray和ngFor正在工作。但我不能在列上迭代。也许我的方法不太好?() { rows: new FormArray([]), for (let i = 0;-- <ng-contain
我嵌套了2个表单数组,不幸的是我收到了这个错误:Cannot find control with path: 'answers -> affectedCategories' 我使用的是角度反应形式,在我开始使用嵌套形式数组之前TS文件: public questionForm: FormGroup;
return this.questionForm.get('answers') as FormArr