Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/angular/26.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Angular TS2339:不动产';控件';不存在于类型';抽象控制&x27;_Angular_Controls - Fatal编程技术网

Angular TS2339:不动产';控件';不存在于类型';抽象控制&x27;

Angular TS2339:不动产';控件';不存在于类型';抽象控制&x27;,angular,controls,Angular,Controls,我正忙于Udemy上的“角度-完整指南(2021版)”,遇到了一些问题: 我一直收到以下错误:TS2339:类型“AbstractControl”上不存在属性“controls” 我正在使用Angular的最新版本 以下是我的HTML代码: <div class="row" *ngFor="let ingredient of recipeForm.get('ingredients').controls; let i =

我正忙于Udemy上的“角度-完整指南(2021版)”,遇到了一些问题:

我一直收到以下错误:TS2339:类型“AbstractControl”上不存在属性“controls” 我正在使用Angular的最新版本

以下是我的HTML代码:

                    <div class="row" *ngFor="let ingredient of recipeForm.get('ingredients').controls; let i = index"
                        [formGroupName]="i" style="margin-top: 10px;">
                        <div class="col-xs-8">

任何建议都将不胜感激!谢谢

你能试试:
(recipeForm.get('Components')。控件吗?。您必须提供组件的TS文件,有人可以帮助您。请查看这是否有帮助: