基于此帖子Multidimensional array with custom class,我想显示(allRows
),更新(使用onUpdateIngridientsNumberAndUnits(...)
和delete(onDeleteIngridientsNumberAndUnits
)条目:
<div class="input-group mb-3">
<!-- todo: How to assign? -->
<!-- <div *ngFor="let row of allRows">-->
<!-- [(ngModel)]="row.IngridientRow_name" -->
<input id="customId_Ingridient" type="text" class="form-control" placeholder="ingridient">
<!-- [(ngModel)]="row.number" -->
<input id="customId_Amount" type="text" class="form-control" placeholder="amount">
<!-- [(ngModel)]="row.UnitRow_name" -->
<input id="customId_Unit" type="text" class="form-control" placeholder="unit">
<div class="input-group-append">
<button id="customId_Delete" class="btn btn-outline-info delete_ingridient"
type="button">Delete</button>
</div>
<!-- </div> -->
</div>
我知道了
您可以在这里找到它:
https://stackblitz.com/edit/angular-5gxunx?file=src/app/app.module.ts
该怎么办,我错了什么?
谢谢。