我們如何通過ng-repeat
將下面的JSON顯示爲ul>li
列表?json ng-repeat angularjs中的多級對象
事情是這樣的:
- 首頁
- 關於我們
- 關於一個
- 關於兩個
- 服務
- 服務一個
- 服務兩個
從下面JSON
{
"Home_page": {
"name": "Home",
"shortname": "Home_page",
"heading": "Welcome to BSL-I"
},
"About_us": {
"About-One": {
"name": "About one",
"heading": "Artist one"
},
"About-Two": {
"name": "About Two",
"heading": "About Two"
}
},
"Service": {
"Service-One": {
"name": "About one",
"shortname": "About_one",
"heading": "Artist one"
},
"service-Two": {
"About-One": {
"name": "About one"
},
"About-Two": {
"name": "About Two"
}
}
}
}