ERROR Error No value accessor for form control with unspecified name attribute at _throwError formsjs26031 at setUpControl formsjs23771 at NgModel_setUpStandalone formsjs52471 at NgModel_s
这个错误是由于表单控件缺少名称属性导致的。解决方法是为表单控件添加名称属性。
例如,如果你使用的是ngModel指令,可以在HTML代码中为该指令添加名称属性:
<input type="text" [(ngModel)]="myValue" name="myControl">
注意:确保名称属性的值是唯一的,不与其他表单控件重复。
原文地址: http://www.cveoy.top/t/topic/i1Xi 著作权归作者所有。请勿转载和采集!