Here is an example of a simple table that will redirect you to the details of clicking on a row:
<table class="table table-hover">
<thead>
<tr>
<td>Id</td>
<td>Title</td>
<td>Amount</td>
</tr>
</thead>
<tbody>
<tr *ngFor="let transfer of transfers" [routerLink]="['/transfer']" [queryParams]="{ id: transfer.id }">
<td>{{transfer.id}}</td>
<td>{{transfer.title}}</td>
<td>{{transfer.amount}}</td>
</tr>
</tbody>
</table>
I suggested that you work with an array transfers
and redirect based id
.
source
share