<table class="table border-primary">
<thead>
<tr>
<th scope="col">#</th>
<th scope="col">FirstName</th>
<th scope="col">LastName</th>
<th scope="col">UserName</th>
<th scope="col">NickName</th>
</tr>
</thead>
<tbody>
<tr *ngFor="let monitor of details">
<th scope="row">3</th>
<td>{{monitor.first}}</td>
<td>{{monitor.last}}</td>
<td>{{monitor.lastone}}</td>
<td>{{monitor.second last}}</td>
</tr>
</tbody>
</table>
我已经通过使用选择器重用了组件
table-2.component.html
<app-table></app-table>
它提供与上面创建的输出相同的输出。在扇区中,如何传递HTTP调用以便插值有效?
确定,代码不足,但我想我已满足您的要求。 |
---|
您需要向@Input
提供app-table
,然后对该值使用*ngFor
: