我找到了答案:https :
//github.com/angular-ui/ng-grid/issues/290
为了完整起见,这里是我的聚集函数的示例:
function WorkLoadCtrl($scope, Issue, $routeParams, HttpCache) { $scope.issues = Issue.jql_search({jql: $routeParams.jql}); $scope.aggFC = function (row) { var res = 0; var calculateChildren = function(cur) { var res = 0; var remaining; angular.forEach(cur.children, function(a) { remaining = a.getProperty('fields.timetracking.remainingEstimateSeconds'); if (remaining) { res += remaining; } }); return res; }; var calculateAggChildren = function(cur) { var res = 0; res += calculateChildren(cur); angular.forEach(cur.aggChildren, function(a) { res += calculateAggChildren(a); }); return res; }; return (calculateAggChildren(row) / 3600).toFixed(2); } $scope.mySelections = []; $scope.gridOptions = { data: 'issues.issues', columnDefs: [ {field:'key', displayName:'key'}, {field:'fields.assignee.name', displayName:'Assignee'}, {field:'fields.status.name', displayName:'Status'}, {field:'fields.summary', displayName:'Summary'}, {field:'fields.timetracking.remainingEstimate', displayName:'Remaining'}, ], showFooter: true, showGroupPanel: true, enablePinning: true, enableColumnResize: true, enableColumnReordering: true, showColumnMenu: true, showFilter: true, //jqueryUIDraggable: true, bug: when used grouping stop work, but column reordering start to work:( selectedItems: $scope.mySelections, multiSelect: false, aggregateTemplate: '<div ng-click="row.toggleExpand()" ng- > <span >{{row.label CUSTOM_FILTERS}} (count: {{row.totalChildren()}} {{AggItemsLabel}} Remaining: {{aggFC(row)}})</span> <div ></div> </div>' };}


