I have 3 api endpoints
- /getAccount which returns
[{"id":"1", "name":"Bank 1", "starting_balance":"0.00"},{"id":"2", "name":"Bank 2", "starting_balance":"10.83"}] into $scope.acc
- /getExpense which returns
[{"id":"1", "amount":"400.00"},{"id":"2", "amount":"500.00"}] into $scope.expense
- /getIncome which returns
[{"id":"1", "amount":"1000.00"},{"id":"2", "amount":"1000.00"}] into $scope.income
I don't know how to combine these three data. Here is my HTML code:
<tr>
<td>Account Name</td>
<td>Starting Balance</td>
<td>Income</td>
<td>Expense</td>
</tr>
<tr ng-repeat="a in acc">
<td>{{a.name}}</td>
<td>{{a.starting_balance}}</td>
<td></td>
<td></td>
</tr>