There is an array with 7 elements, each containing an object. The goal is to display these elements in a table with one row and 7 columns. The desired output should look like this:
some label1 | some label2 | some label3 | some label4 | some label5 some label6 | some label7
0
JavaScript
$scope.array = [
[
{
id: 1,
label: 'some label1'
}
],
[
{
id: 2,
label: 'some label2'
}
],
[
{
id: 3,
label: 'some label3'
}
],
[
{
id: 4,
label: 'some label4'
}
],
[
{
id: 5,
label: 'some label5'
}
],
[
{
id: 6,
label: 'some label6'
}
],
[
{
id: 7,
label: 'some label7'
}
]
];
HTML
<table>
<tr ng-repeat="item in array"></tr> // this will generate 7 rows
</table>