title: How to set aggregation with grouping in ng-grid
body: <p>I want to see totals (or generally any aggregation function) for each group in a grid.</p>
  
  <p>This was requested and closed as done in issue: <a href="https://github.com/angular-ui/ng-grid/issues/95" rel="nofollow">https://github.com/angular-ui/ng-grid/issues/95</a> (but unfortunately without any example).</p>
  
  <p>I am able to redefine default template <a href="https://github.com/angular-ui/ng-grid/blob/master/src/templates/aggregateTemplate.html" rel="nofollow">https://github.com/angular-ui/ng-grid/blob/master/src/templates/aggregateTemplate.html</a> by <code>aggregateTemplate</code> config option. But I don't know how to extend it properly.</p>
  
  <p>This template is evaluating in ng-grid scope and I don't know how to trigger my custom aggregation function. I want to create similar function as '''totalChildren''' (from <a href="https://github.com/angular-ui/ng-grid/blob/master/src/classes/aggregate.js" rel="nofollow">https://github.com/angular-ui/ng-grid/blob/master/src/classes/aggregate.js</a> )</p>
  
  <p>Any ideas?</p>