角2を書き込む方法を教えてください@Pipe
またはテーブルに連続番号を追加する機能はありますか?これは私のテンプレートの一部です:テーブルの番号
<table class="table table-bordered table, table table-hover">
<thead>
<tr>
<td colspan="12" align="center">none</td>
</tr>
<tr>
<th>consecutive number</th>
<th>none</th>
<th>none</th>
</tr>
<tr style="background: #F5F5F5">
<td></td>
<td></td>
<td></td>
</tr>
</thead>
<tfoot>
<tr>
<td colspan="8"></td>
<td colspan="2">none: none</td>
<td colspan="2">none: none</td>
</tr>
</tfoot>
<tbody>
<template ngFor let-list [ngForOf]="lists">
<tr>
<td></td>
<td>{{ list.name }}</td>
<td>{{ list.location }}</td>
</tr>
<div [hidden]="!list.isVisible">
<br>
<table>
<thead>
<tr>
<th>none</th>
<th>none</th>
<th>none</th>
</tr>
</thead>
<tbody>
<tr *ngFor="let new_var of list.hops">
<td>{{ new_var.hop_type }}</td>
<td>{{ new_var.hop_text }}</td>
<td>{{ new_var.id_sl_hop }}</td>
</tr>
</tbody>
</table>
私は<th>consecutive number</th>
に連続番号を追加し、*ngFor
ディレクティブ、または何か他のもののように、<td>...<td>
にいくつかの@Pipe
または別の関数を追加します。
である必要があり、実際の反復のインデックスを取得または私はちょうど誤解たいですか? – ulou