我有两个不同的列表(每个列表来自不同的API)。如何在AngularJS模板的两个div中(行方向)或两个不同的行中填充数据?
如果不清楚,请通知我。我对此还比较陌生。
答案 0 :(得分:0)
<div class="container">
<div class="row">
<div class="col">
<table class="table">
<thead>
<tr>
<th scope="col">#</th>
<th scope="col">api_1</th>
</tr>
</thead>
<tbody>
<tr ng-repeat="n in api_1">
<th>{{n.id}}</th>
<td>{{n.name}}</td>
</tr>
</tbody>
</table>
</div>
<div class="col">
<table class="table">
<thead>
<tr>
<th scope="col">#</th>
<th scope="col">api_2</th>
</tr>
</thead>
<tbody>
<tr ng-repeat="n in api_2">
<th>{{n.id}}</th>
<td>{{n.name}}</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>