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