【发布时间】:2021-10-14 00:35:30
【问题描述】:
每个主题的月数、主题和参数是可变的,因为我从数据库中获取它们,所以我试图实现它,我想出了这个解决方案:
<div class="col-13">
<form #login (ngSubmit)="onSubmit()" novalidate>
<table class="table table-striped table-bordered">
<thead>
<tr>
<th>Figura professionale</th>
<th>Dipendente</th>
<th *ngFor="let column of mesi; let k = index">
{{column}}
</th>
</tr>
</thead>
<tbody>
<tr *ngFor="let row of FigProfs; let i = index">
<td>{{row.nome}}</td>
<table>
<tr *ngFor="let innerrow of Dips[i]; let k = index">
<td>{{innerrow.nome}} {{innerrow.cognome}}</td>
<td *ngFor="let column of mesi; let j = index">
<input id="gd{{row.id}}_{{column}}" name = "gd{{row.id}}_{{column}}" type="number" ng-init="get(row.id,column)=0" [ngModel]="get(row.id,j)" (ngModelChange)="set(row.id,innerrow.id,j,$event)">
</td>
</tr>
</table>
</tr>
</tbody>
</table>
<button class="btnsubmit" type="submit">AVANTI</button>
</form>
【问题讨论】:
标签: html angular typescript bootstrap-4