html代码:
ExpressionChangedAfterItHasBeenCheckedError:检查后表达式已更改。以前的值:'mat-focused: false'。当前值:'mat-focused: true'。
当我单击 packmaterial 输入时,它给出了这个错误。
<div formArrayName="packageArray" *ngFor="let item of packageArray.controls; let i = index;">
<div [formGroupName]="i" class="add-div" >
<p>Level {{i+1}} Pack</p>
<div class="d-flex justify-content-between">
<mat-form-field>
<input matInput type="text" (click)="addLevelPack(i)" placeholder="Package Material" formControlName="packMaterial" required>
Run Code Online (Sandbox Code Playgroud)
在这一行,我有这个错误
</mat-form-field>
<mat-form-field>
<input matInput type="text" placeholder="UOM" formControlName="UOM" required>
</mat-form-field>
<mat-form-field>
<input matInput type="text" placeholder="Quantity" formControlName="Quantity" required>
</mat-form-field>
<mat-form-field>
<input matInput type="text" placeholder="Weight(kgs)" formControlName="weight" required>
</mat-form-field>
</div>
</div>
</div>
<div class="btn-custom" (click)="addPackage()">
<span mat-raised-button style="cursor:pointer">Add packaging +</span>
</div>
<p>Total packaging</p>
<div *ngFor="let item of …Run Code Online (Sandbox Code Playgroud) angular8 ×1