【发布时间】:2018-12-13 00:33:27
【问题描述】:
我有一个角度为 6 的表格。这是工作查找,但我想在 ngfor 中使用它,但它没有按预期工作。这是表格:
.hiddenRow {
padding: 0 !important;
}
<table class="table table-condensed" style="border-collapse:collapse;">
<thead>
<tr>
<th>#</th>
<th>Date</th>
<th>Description</th>
<th>Credit</th>
</tr>
</thead>
<tbody>
<tr data-toggle="collapse" data-target="#demo1" class="accordion-toggle" style="cursor: pointer;">
<td>1</td>
<td>05 May 2013</td>
<td>Credit Account</td>
<td class="text-success">$150.00</td>
</tr>
<tr>
<td colspan="12" class="hiddenRow">
<div class="accordian-body collapse jumbotron" id="demo1">
Demo1
</div>
</td>
</tr>
</tbody>
</table>
除了我想包含*ngFor 以便循环许多元素之外,这是有效的发现。任何想法 ?
【问题讨论】:
-
发布你想要循环的数组\
-
@SachilaRanawaka 我在具有完全相同行的简单数组上循环,例如 [0, 1, 2, 3]
-
这是stackoverflow.com/questions/26588753/… 的重复吗?使用手风琴而不是隐藏行?