Skip to content Skip to sidebar Skip to footer

How To Loop Multiple Table Th In Angularjs

Solution 1:

This should work -

<table class="table table-bordered">
<thead>
  <tr>
     <th></th>
     <th colspan="3" ng-repeat="din $ctrl.otherdata">{{d.name}}</th>
   </tr>
   <tr>
      <th>User ID</th>
      <th ng-repeat-start="x in $ctrl.otherdata">ABC</th>
      <th>XYZ</th>
      <th ng-repeat-end>PQR</th>
    </tr>
  </thead>
  <tbody>
    <tr ng-repeat="data in $ctrl.somedata">
      <td>{{data.name}}</td>
      <td>{{data.x}}</td>
      <td>{{data.y}}</td>
      <td>{{data.z}}</td>

    </tr>

  </tbody>
</table>

Post a Comment for "How To Loop Multiple Table Th In Angularjs"

{{d.name}}