У меня есть два разных списка (каждый из которых имеет разные API).Как заполнить эти данные двумя делениями (по строкам) или двумя строками в шаблоне в AngularJS?
Пожалуйста, дайте мне знать, если я не уверен.Я относительно новичок в этом.
<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>
Плункер: http://plnkr.co/edit/tLehZCkpuo0DL5eLNk8z?p=preview