動的HTML表で助けが必要です。2つの静的列を持つ動的表colspan列
私が達成したいのは、sthです。このように:
+----------+-------------+--------------+-----+
| Column1 | dynamic col | dynamic col2 | etc |
| |-------------+--------------+-----+
| rowspan2 | col3 | col4 | col3 | col4 | etc |
+----------+------+------+------+-------+-----+
私はすでにいくつかのことを試してみましたが、私の唯一の解決策は、次のようになります。
<table class="table table-striped table-bordered table-hover">
<thead>
<tr>
<th rowspan="2">Column1</th>
<th colspan="2" *ngFor="let col of columns">dynamic col</th>
</tr>
<tr>
<th colspan="2" *ngFor="let col of columns" >
<div style="display: inline-block">col3</div>
<div style="display: inline-block">col4</div>
</th>
</tr>
</thead>
<tbody>
</tbody>
</table>
そして2つのdiv arroundの構築しようとし...より良い解決策はありますか? ありがとうございます!
本当に静的なcolnamesを持つ配列を持っていました。ありがとう、私はそれを行います! :) – tstellfe