是否可以将ngModel的表达式设置为数字?像这样:
[(ngModel)] = “coeffHour.01”
有了这个,我有以下错误:
分析器错误:[coeffHour.01]中第10列的意外标记'0.01',ng:///AdministrationModule/CoefficientsHourComponent.html@27:48(“name =”01“required type =”number“min = “0”步=“0.1” formControlName =“01”[错误 - >] [(ngModel)] =“coeffHour.01”>
提前致谢!
答案 0 :(得分:0)
[(ngModel)]
不会包含数字。
您需要使用它:
[(ngModel)]="coeffHour[01]"