angular报错:Cannot assign to a reference or variable
错误代码:
<input #manufacturerId="ngModel" id="manufacturerId" name="manufacturerId" [(ngModel)]="manufacturerId" [disabled]="!isEdit">
报错原因: 同时声明了#manufacturerId="ngModel" 和[(ngModel)]="manufacturerId"。
解决方案,将其中一个参数名改掉即可,比如我将前面的manufacturerId改成manufacturerIdInput。