Calculate total of rows in ng-repeat with other controller
问题 I got rows where a total will be calculated. In my ng-repeat I have a controller RowCtrl where I calculate the total. app.controller('RowCtrl', function ($scope) { $scope.unit_price = 0; $scope.quantity = 0; $scope.$watchCollection('[row.unit_price, row.quantity]', function () { $scope.row.total = $scope.row.unit_price * $scope.row.quantity; }); }); How can I calculate the total of all the rows? In the fiddlr I have a demo of the rows where the total of a row is already calculated. Fiddlr: