I have a unique requirement that I would like you to consider before labeling as a duplicate. Let's delve into the following example:
<table ng:init="stuff={items:[{description:'gadget', cost:99,date:'jan3'},{description:'thing', cost:101,date:'july6'},{description:'thing', cost:101,date:'jan3'} ]}">
<tr>
<th>Description</th>
<th>Cost</th>
</tr>
<tr ng:repeat="item in stuff.items|filter"> /*only display filtered items grouped by date*/
<td>{{item.description}}</td>
<td ng-bind='item.cost'>{{item.cost}}</td>
</tr>
<tr>
<td></td>
<td>{{total}}</td> /*total cost of items grouped by date jan3*/
</tr>
</table>
How can I calculate the total cost of grouped items? Is there a data attribute in Angular where I can store and sum up the costs for each grouped item, before moving on to the next group?