-1
angualrjsでネストされたng-repeatを使用していて、内側のng-repeat配列の長さが異なります。したがって、インデックスは順番に表示されません。 インデックスの出力が順番に必要です。出力のスクリーンショットを添付しました。内側のng-repeat配列が異なる場合、ng-repeat内のインデックス値ng-repeat配列が異なる場合
誰でも手伝ってもらえますか?
<table class="table">
<thead>
<th>#($index)</th>
<th>L #</th>
<th>C Name</th>
<th>A #</th>
<th>F P</th>
</thead>
<tbody ng-repeat="d in displayData" >
<tr ng-repeat="a in d.f_p track by $index" >
<td>{{($parent.$index*d.f_p.length)+($index+1)}}</td>
<td>{{d.lId}}</td>
<td>{{d.cName}}</td>
<td>{{$index+1}}</td>
<td>{{a}}</td>
</tr>
</tbody>
</table>
$scope.displayData=[{"lId": "369857","cName": "ABCD","f_p":0.04401,0.04402,0.04403]},{"lId": "369858","cName": "BCDE", "f_p":[0.04401,0.04402,0.04403,0.04404]},{"lId": "369859","cName": "CDEF", "f_p":[0.04401,0.04402,0.04403,0.04404,0.04405]}];
あなたはjsfiddleを作成でき –
我々は中に気づくことになっているものスクリーンショット?問題は明確ではなく、どちらもあなたが期待するものではありません – charlietfl