0
我發現很難使之適合於NG-重複遍歷它在視圖中重新定義的返回信息。在混合JSON巢角的forEach
我有一個索引兩種意見之一,我想年月涵蓋的國家(可能是1 +或無),然後每個國家內部,我想每一個事件的名稱(又可能是1+或沒有)。第二個觀點,我只是想通過事件的詳細信息,並通過傳遞以此來回報所有事件的詳細信息(姓名,MNAME,淨)事件索引號被調用這些細節。
數據:
{
months: [
{
index: 201602,
year: "2016",
mon: "February",
country1: [
{
index: 12345678,
l: [
{
name: "Test1",
mname: "Test 1",
net: "February 10, 2016 11:39:00 UTC",
}
]
},
{
index: 23456789,
l: [
{
name: "Test2",
mname: "Test 2",
net: "February 10, 2016 11:39:00 UTC",
}
]
}
],
country2: [ ]
},
{
index: 201603,
year: "2016",
mon: "March",
country1: [
{
index: 546547657654,
l: [
{
name: "Test1",
mname: "Test 1",
net: "March 10, 2016 11:39:00 UTC",
}
]
}
],
country2: []
},
{
index: 201604,
year: "2016",
mon: "April",
country1: [ ],
country2: [
{
index: 78676756,
l: [
{
name: "Test1",
mname: "Test 1",
net: "April10, 2016 11:39:00 UTC",
}
]
}
]
}
]
}
那麼,什麼是你的問題?是不是因爲某種原因或者什麼不能重複你的數組? –
是的,我無法迭代陣列之上,我相信這是由於角度的限制,我需要與只是我將它傳遞給視圖之前需要的水平以某種方式重新定義陣列。 – medoix