Thursday, 21 July 2016

multiples ng-repeat for populate table

Im trying to populate the same table with values from different scope variables. The A and B will always have the same lenght.

$scope.a = [1,2,3]
$scope.b = [4,5,6]
<table>
  <thead>
    <tr>
      <th>A</th>
      <th>B</th>
    </tr>
  </thead>
  <tbody>
    <tr ng-repeat="itemA in a, itemB in b"> <!-- How should be this ng-repeat?-->
      <td></td>
      <td></td>
    </tr>
  </tbody>
</table>

The result should be a table like:

A - B

1 - 4

2 - 5

3 - 6



from Recent Questions - Stack Overflow http://ift.tt/29OtoHo
via https://ifttt.com/ IFTTT

No comments:

Post a Comment