Issue
Guys I have two arrays to map in each rows column,so first loop in some column of the row successfully mapped with ng-repeat
but I have other loop in the same row to map few column in the same row. So can I use ng-repeat
here, how do I deal with this issue?
<tr ng-repeat="x in liveclaimdata" ng-repeat="y in hxdata" line-height="24px" id="row_{{$index+1}}" >
<td></td>
<td></td>
<td></td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td id="{{$index+1}}_payer"></td>
<td id="{{$index+1}}_payer"></td>
<td id="{{$index+1}}_denials" ng-required="false" >{{x.denials}}</td>
<td id="{{$index+1}}_low_reimb">{{x.low_reimb}} </td>
<td id="{{$index+1}}_bundling">{{x.bundling}}</td>
<td id="{{$index+1}}_payer_rating">{{x.payer_rating}}</td>
<td id="{{$index+1}}_mr_request">{{x.mr_request}}</td>
<td id="{{$index+1}}_appeal_percentage">{{x.appeal_percentage}}</td>
<td id="{{$index+1}}_appeal_paid_percentage">{{x.appeal_paid_percentage}}</td>
<td>Test {{y.denials}} </td>
<td> </td>
<td> </td>
<td> </td>
</tr>
Here ng-repeat="y in hxdata"
is not working.
Live data array
0
:
$$hashKey
:
"object:61"
appeal_paid_percentage
:
"0"
appeal_percentage
:
"0"
bundling
:
"0"
cpt
:
"35301"
denials
:
"0"
low_reimb
:
"1"
mr_request
:
"0"
payer
:
"AETNA INSURANCE - TRS/KY"
payer_rating
:
"0"
row_num
:
"0"
1
:
$$hashKey
:
"object:62"
appeal_paid_percentage
:
null
appeal_percentage
:
null
bundling
:
null
cpt
:
"26370"
denials
:
null
low_reimb
:
null
mr_request
:
null
payer
:
"AETNA INSURANCE - TRS/KY"
payer_rating
:
null
row_num
:
"1"
__p
Similar structure in hx data
Solution
Based on my understanding about the problem, you have related data in 2 arrays and you want to use ng-repeat
to paint it.
Update (remove second ng-repeat)
<tr ng-repeat="x in liveclaimdata" ng-repeat="y in hxdata" line-height="24px" id="row_{{$index+1}}" >
to
<tr ng-repeat="x in liveclaimdata" line-height="24px" id="row_{{$index+1}}" >
and
Update (use the index to iterate over second array)
<td>Test {{y.denials}} </td>
to
<td>Test {{hxdata[$index].denials}} </td>
Answered By - Nikhil Aggarwal
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.