I'd like to build a table that looks like that : table
I tried something in my dataset, but as datas are nested, I don't have any idea how I can display them with ng-repeat in my html.
Also resultsJ1,2,3 and listnqJ1,2,3 are lists so we have to be able to access the elements of the list
table = [
{ day: " Day1" , webservices : [
{ws: resultsJ1, tnq : listnqJ1 }
]
},
{ day: " Day2", webservices : [
{ws :resultsJ2, tnq : listnqJ2 }
]
},
{ day: " Day3" , webservices : [
{ws :resultsJ3, tnq : listnqJ3 }
]
}
]
$scope.listnqJ1 = tableau[0].webservices[0].tnq;
$scope.listnqJ2 = tableau[1].webservices[0].tnq;
$scope.listnqJ3 = tableau[2].webservices[0].tnq;
$scope.resultsJ1 = tableau[0].webservices[0].ws;
$scope.resultsJ2 = tableau[1].webservices[0].ws;
$scope.resultsJ3 = tableau[2].webservices[0].ws;
self.tableau = tableau
I found that in my html, it works for the resultsJ1,2,3 lists but I have a huge problem displaying the results under Day 1, 2 , 3 : listnqJ1,2,3.
<table cellpadding="20" rules="GROUPS" frame="BOX">
<thead>
<tr>
<th>Web Service</th>
<th style="width: 100px" ng-repeat="day in ctrl.tableau ">
{{day.jour}}
</th>
</tr>
</thead>
<tbody>
<tr style="width: 100px" class="xl153" ng-repeat="ws in resultsJ1 track by $index">
<td>{{ws}}</td>
<td style="width: 100px" class="xl153" ng-repeat="day in ctrl.tableau" >
<td
style="width: 100px"
class="xl153"
ng-repeat="tnq in listnqJ1 track by $index"
>
{{tnq}}
</td>
</td>
</tr>
<tr class="xl153" ng-repeat="ws in resultsJ2 track by $index">
<td>{{ws}}</td>
</tbody>
</table>