I want to build a table from an array that has this scheme:
var items = [
{
name: 'xxx',
configurations: [
{
image: 'aaa.jpg'
},
{
image: 'bbb.jpg'
},
...
]
},
{
name: 'yyy',
configurations: [
{
image: 'ccc.jpg'
},
{
image: 'ddd.jpg'
},
...
]
},
...
]
I want to to achive one single row with all images from all elements (every image is nested in one <td>, like:
<tr>
<td>
<img src="aaa.jpg">
</td>
<td>
<img src="bbb.jpg">
</td>
<td>
<img src="ccc.jpg">
</td>
<td>
<img src="ddd.jpg">
</td>
</tr>
How can I do it with angular? My code so far looks like this:
<tr>
<td ng-repeat-start="proposition in items">
<img ng-src="{{::proposition.configurations[0].image}}" />
</td>
<td ng-repeat-end>
<img ng-src="{{::proposition.configurations[1].image}}" />
</td>
</tr>
But obviously a number of configurations in proposition is dynamic, so how can I iterate through it, keeping the same html scheme?
<td>?<td>