Here my angular code:
//first ng repeat
$http.get(server_base_url + "api/v1/testsectionlist/" + $scope.instslug + "/" + $scope.test Slug)
`enter code here`
.success(function(section Data) {
$scope.section Data = section Data;
})
//second ng repeat
$http.get(server_base_url + "api/v1/correctques/" + $scope.testSlug + "/" + $scope.test Id)
.success(function(correct ques) {
$scope.correct cues = correct ques;
//console.log($scope.correct ques);
})
<div class="col-xs-4" style="padding-left: 0px; padding-right: 0px;" ng-repeat="sectionView in sectionData">
<div class="card" style="height: 175px;">
<div class="card-heading">
<h2 style="text-transform: uppercase;">{{sectionView.section}}</h2>
</div>
<div class="list-group list-group-lg no-bg">
<a href="" class="list-group-item text-ellipsis">
<span class="pull-right" ng-repeat="sectionscoreData in correctques">
<span ng-if="sectionView.sectionId == sectionscoreData.sectionId && sectionscoreData.answer == sectionscoreData.selectOption">{{sectionscoreData.sectionId}}</span>
</span>
</a>
</div>
I'm using two ng-repeat
and check multiple condition but, not counting total id in my span ng-if
condition.
Can anyone help me to count the array length for ng-if
multiple conditions and also use multiple ng repeats?
Thanks in advance.