Angular: If ngModel is used within a form tag, either the name attribute must be set or the form control must be defined as ‘standalone’ in ngModelOptions. 在Angular中,动态生成的Html控件,如果没有name属性并且在ts中要操作Model的内容。就会引发如题的错误。 解决方案两个: 加上name的属性 设置ngModelOptions [ngModelOptions]="{standalone: true}"