I am encountering an issue where I have to present an array of data within a table using Angular.js. Below is an explanation of my code.
Table:
<table class="table table-bordered table-striped table-hover" id="dataTable" >
<tbody>
<tr>
<td rowspan="2">Date</td>
<td rowspan="2">id</td>
<td rowspan="2">email</td>
<td colspan="7">Order</td>
</tr>
<tr>
<td>Order Id</td>
<td>Status</td>
</tr>
<tr>
<td></td>
<td></td>
<td></td>
<td> </td>
<td> </td>
</tr>
</tbody>
</table>
Below is the explanation of my array of data.
$scope.listOfData=
[
{
"date": "2016-01-25 18:14:00 to 2016-02-05 11:26:05",
"id": "36",
"email": "<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="4a382b200a2d272b232664292527">[email protected]</a>",
"order": [
{
"order_status": 1,
"order_id": 1111
},
{
"order_status": 0,
"order_id": 2222
},
{
"order_status": 1,
"order_id": 5555
}
]
},
{
"date": "2016-01-23 13:15:59 to 2016-01-25 18:14:00",
"id": "37",
"email": "<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="86f4e7eef3eac6e1ebe7efeaa8e5e9eb">[email protected]</a>",
"order": [
{
"order_status": 1,
"order_id": 3333
},
{
"order_status": 0,
"order_id": 4444
}
]
}
]
I require assistance in displaying the above data in the table using Angular.js. Can someone please help me with this task?