我正在使用以下引导程序表:
<table class="table table-striped">
<thead>
<tr>
<th>Episode Date</th>
<th>Day</th>
<th>Projected Cost</th>
<th>Comments</th>
</tr>
</thead>
<tbody>
<tr ng-repeat="epi in episodes">
<td>
<input type="hidden" ng-model="epi.COST_PRG_EPS_TXN_ID" />
<label>{{epi.PRG_EPISODE_DATE_DIS | date:'dd-MMM-yyyy'}} </label>
</td>
<td>{{ epi.PRG_EPISODE_DAY }}</td>
<td>
<input type="text" ng-model="epi.COST_PROJECTED" onkeypress="return OnlyNumeric(event);" />
</td>
<td>
<input type="text" ng-model="epi.COMMENTS" />
</td>
</tr>
</tbody>
</table>
我收到错误:
TypeError:无法读取属性&#39; insertBefore&#39;为null
当我将ng-repeat
用于表格行(tr
)时。
但是,当我将ng-repeat
剪切并粘贴到tbody
时,它可以正常运行。
要求是在表格中重复tr
而不是tbody
。我该怎么办?