In the first <tr>
, I have a table with many <td>
elements that I am populating using ng-repeat.
<tr ng-repeat="receipt in $data">
<td data-title="voucher number">
<span>{{receipt.voucher_no}}</span>
</td>
<td data-title="voucher date" sortable="'voucher_date'" filter="{'voucher_date': 'text' }">
<span>{{receipt.voucher_date}}</span>
</td>
<td data-title="voucher Amount">
<span>{{receipt.voucher_amount}}</span>
</td>
</tr>
I also have JSON data like this:
{
"data": [
{
"voucher_no": "2",
"voucher_amount": "100",
"voucher_date": "2014-05-04"
},
{
"voucher_no": "3",
"voucher_amount": "1000000",
"voucher_date": "2014-02-05"
},
{
"voucher_no": "4",
"voucher_amount": "50000",
"voucher_date": "2014-02-05"
},
.
.
.
.
{
"total": 1360100
}
]
}
Please note that there is only one field, 'total', in the final row data.
For all the rows except the final row, I want to print 3 <td>
elements.