Me gustaría construir una tabla que se vea así: table
Intenté algo en mi conjunto de datos, pero como los datos están anidados, no tengo idea de cómo puedo mostrarlos con ng-repeat en mi html.
También resultsJ1,2,3 y listnqJ1,2,3 son listas, por lo que debemos poder acceder a los elementos de la lista.
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 = tableauEncontré que en mi html, funciona para las listas de resultadosJ1,2,3 pero tengo un gran problema al mostrar los resultados en el Día 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>