0
我需要知道在HTML中訪問的集合對象的數據,如下圖所示:如何訪問HTML中的Collectin對象數據使用流星?
var fieldData = [
{fieldName: "Hcare1",
fieldOptions: [ "Bike","Car","TV","Radio","etc"]
},
{fieldName: "Hcare2",
fieldOptions: [ "Bike1","Car1","TV1","Radio1","etc"]
},
{fieldName: "Hcare3",
fieldOptions: [ "Bike2","Car2","TV2","Radio2","etc"]
}
];
在上面的代碼如何訪問fieldOptions在html.The fieldData數據插入到一個集合,即收藏集名稱Fields
。我對流星很陌生,所以請你建議我該怎麼做?
是的,但它返回像一個字符串意味着它顯示自行車,汽車,電視,無線電等像這樣,但我需要得到像數組意味着一個訪問。 – Venkat
試一試HTML: '{{#each array}} {{@index}}:{{this}} {{/ each}}' – none
Look [here](http://handlebarsjs.com/ )。循環瀏覽項目 – none