Saya menulis fail json yang dipanggil demo.js secara tempatan, dan kemudian saya mahu data dalam ng-repeat. Masalah yang saya hadapi sekarang ialah:
Saya tidak tahu cara mengulang data peranan.
{
"demoData": [
{
"dp": "aaa1",
"name": "用户名1",
"number": "11111",
"score": "22222",
"salary": "11111",
"jobs": "scripts",
"roles": [
{
"new": "bbb",
"edit": "ddd",
"ccc": "aaaa",
"del": "dddd"
}
],
"other": "备注",
"action": "删除"
},
{
"dp": "bbb",
"name": "用户名1",
"number": "11111",
"score": "22222",
"salary": "11111",
"jobs": "scripts",
"roles": [
{
"new": "bbb",
"edit": "ddd",
"ccc": "aaaa",
"del": "dddd"
}
],
"other": "备注",
"action": "删除"
}
]
}
Ia boleh diselesaikan dengan dua peringkat bersarang
Gelung Bersarang