私は角度jsを使い慣れていますが、これを理解しようとしましたが、結果が表示されない理由はまだ分かりません。私はentry_date
とremarks
を取得しようとしています。ここに私の配列の例である: -Ngのリピート結果が表示されない
0: {
name: "James",
student_branch: {
0: {
entry_date: "13 Dec 2016",
remarks: "Naughty"
},
1: {
entry_date: "13 Dec 2017",
remarks: "Nice"
}
}
class: "Gems"
}
1: {
name: "Admiral",
student_branch: {
0: {
entry_date: "13 Dec 2016",
remarks: "Naughty"
},
1: {
entry_date: "13 Dec 2017",
remarks: "Naughty"
}
}
class: "Gold"
}
私はこれを試してみましたが、それは動作しません、上に示した配列はstudentDetails
にされ、
<tr ng-repeat="customer in studentDetails">
<td ng-repeat="(key, value) in studentHeader">
<!-- Ignore this line -->
<div ng-repeat="item in customer.student_branch track by $index">
<span ng-repeat="value in item track by $index">{{value.entry_date}}</span>
<span ng-repeat="value in item track by $index">{{value.remarks}}</span>
</div>
</td>
</tr>
のようないくつかの変更する必要がありますか?その線は重要と思われる。 – blackmiaool
@blackmiaoolその行は単に列を作成するだけですが、とにかく私はその解決策を見つけたと思います。ありがとう! – NickyMan
あなたの 'studentHeader'変数を私に見せてください – Gaurav