AngularJS - I have the following structure as I come to the table below

1

I have the following structure as I come to the table below it is important that all be td

p:{
    0 :{
        s:{
        0 :{fruta:"manzana"}
        1 :{fruta:"pera"}
        }
    }
    1: {
        s: {
        0 :{fruta:"mango"}
        1 :{fruta:"uva"}
        }
    }
}

asi:

<table border="1">
    <tr>
        <td>manzana</td>
        <td>pera</td>
        <td>mango</td>
        <td>uva</td>
    </tr>
</table>
    
asked by Juana 04.08.2018 в 02:21
source

1 answer

0

since you uploaded it to plunker I could understand what you want.

You have to take into account that your result you want to show it in a single column, then the last ng-repeat should be in <tr> and not in <td>

You can use the <tbody> tag for example to group them.

In the end you would have something like this

<tbody ng-repeat="p in elementos">
      <tr ng-repeat="s in  p.Websites">
        <td >{{s.WebsiteName}}</td>
      </tr>
</tbody>

I hope you serve

    
answered by 04.08.2018 в 20:59