0
如何在打印表時實現ORDER BY在升序或降序mainSubjectAllocationList & optionSubjectAllocationList KEY。angularJS排序按鍵列表
我的代碼如下
vm.sectionListWithClass = [
{
"classStd": "Prep-2015",
"classId": "1",
"section": "B",
"sectionName": "RED",
"sectionId": "6",
"mainSubjectAllocationList": "Hindi, Biology, Geography, English, Chemistry",
"mainSubjectAllocationId": "28",
"optionSubjectAllocationList": "Chemistry, P.T, 3rd lang Urdu, Art, 3rd lang Arabic, 3rd lang Chinese, 3rd lang German, Life Skill",
"optionSubjectAllocationId": "27"
}
]
<tbody ng-repeat="(key, value) in vm.sectionListWithClass | groupBy: 'classStd'" >
<tr ng-repeat="player in value | orderBy: 'section' | orderBy:'mainSubjectAllocationList':true">
什麼上面的代碼的結果呢? – Eria
其在部分上的順序只在部分和mainSubjectAllocationList上都沒有。備用我更改我的SQL查詢 – fresher