I have on angular js which will deals with an object . That object have one
property called "GroupID" each group have different items(marks). I want to
get the sum of marks based on the group.will it be possible in angular js?
scenario
group 1
1
2
3
group 2
4
2
3
group 3
4
5
7
I have a code for getting the sum of all marks. But not sure How to do that
with group wise. can anyone help?
angular.forEach($scope.marks, function (mark, index) {
var DetailsVM = {};
DetailsVM.QuestionID = mark.GroupID;
DetailsVM.Score = (parseInt(mark.Weightage) +
parseInt(mark.Deduction)));
$scope.form.push(DetailsVM);
});
thanks,
--
You received this message because you are subscribed to the Google Groups
"AngularJS" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.