伙计们,我有两个数组要在每一行列中映射,因此首先在该行的某些列中循环,成功使用ng-repeat
映射,但我在同一行中有其他循环来映射几列在同一行。那么我可以在这里使用ng-repeat
吗,我该如何处理这个问题?
<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>
此处 ng-repeat="y in hxdata"
不起作用。
实时数据数组
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
hx 数据中的类似结构
最佳答案
根据我对这个问题的理解,你有两个数组中的相关数据,并且你想使用ng-repeat
来绘制它。
更新(删除第二个 ng-repeat)
<tr ng-repeat="x in liveclaimdata" ng-repeat="y in hxdata" line-height="24px" id="row_{{$index+1}}" >
至
<tr ng-repeat="x in liveclaimdata" line-height="24px" id="row_{{$index+1}}" >
和
更新(使用索引迭代第二个数组)
<td>Test {{y.denials}} </td>
至
<td>Test {{hxdata[$index].denials}} </td>
关于javascript - Angularjs - 使用 ng-repeat 连续多次循环,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/50055649/