Alguien sabe como sumar una columna de una tabla generada con ng-repeat, anexo codigo.
Html
<div class="row">
<div class="col-md-10 col-md-offset-1">
<div class="table-responsive">
<table class="table table-condensed table-bordered">
<thead>
<tr class="bg-red">
<th class="text-center">Criterio</th>
<th class="text-center">Sinodal 1</th>
<th class="text-center">Sinodal 2</th>
<th class="text-center">Sinodal 3</th>
<th class="text-center">Total</th>
</tr>
</thead>
<tbody>
<tr ng-repeat="x in lista">
<td>{{x.Criterio}}</td>
<td class="text-center"><input type="number" min="0" max="4" ng-model="sinodal1" ng-init="sinodal1=x.sin1" class="form-control text-center"></td>
<td class="text-center"><input type="number" min="0" max="4" ng-model="sinodal2" ng-init="sinodal2=x.sin2" class="form-control text-center"></td>
<td class="text-center"><input type="number" min="0" max="4" ng-model="sinodal3" ng-init="sinodal3=x.sin3" class="form-control text-center"></td>
<td class="text-center"><input id="sumC" type="number" ng-model="sumCri" value="{{sumCri=sumaCriterios(sinodal1,sinodal2,sinodal3)}}" class="form-control text-center"></td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
Angular js
<script>
var app = angular.module("ltsTareas", []);
app.controller("listaController", ["$scope", function ($scope) {
$scope.total = 0;
$scope.lista = [{ "Criterio": "Clase modelo", "sin1": 2, "sin2": 3, "sin3": 4,"sumCri":9 },
{ "Criterio": "Clase estrella", "sin1": 1, "sin2": 4, "sin3": 2, "sumCri": 7 },
{ "Criterio": "Prueba Modelo", "sin1": 2, "sin2": 2, "sin3": 1, "sumCri": 5 }
];
$scope.sumaCriterios = function (sin1, sin2, sin3) {
S1 = sin1 == null ? 0 : sin1;
S2 = sin2 == null ? 0 : sin2;
S3 = sin3 == null ? 0 : sin3;
return S1 + S2 + S3;
};
console && console.log();
}]);
</script>