我在angularJs中有递归问题。儿童内部角儿童
我想重复从JSON文件中的所有名称: 这里是我的JSON文件结构:
var data = {
"id": "580",
"name": "test",
"status": "ACTIVE",
"parentId": null,
"children": [
{
"id": "581",
"name": "test 2",
"status": "ACTIVE",
"parentId": "580",
"children": [{
"id": "594",
"name": "test 3",
"status": "ACTIVE",
"parentId": "581",
"children": []
}]
}
]
}
所有我想要的只是知道如何使NG-重复孩子的孩子吗?
有多少级的孩子?据我所知,你不能使用'ng-repeat'递归。 –
那些孩子可以动态生成。所以我没有任何想法应该在那里! –
谷歌'角递归树'应该找到很多的解决方案,模块,指令等 – charlietfl