我定义了一个 Ember 对象,它从 .json 文件中获取数据。
我正在使用 ember 和 x-handlebars 从已使用 Ember 数组控制器定义为 Ember 对象的一部分的数组输出图像。
数组定义如下:
{
"gallery_small": ["data/images/gallery_01_small.jpg", "data/images/gallery_02_small.jpg"]
}
我当前的 html 是:
{{#each content.gallery_small}}
{{#collection contentBinding="Application.projectdetailController"}}
{{content.gallery_small}}
{{/collection}}
{{/each}}
当前输出的是
data/images/gallery_01_small.jpg,data/images/gallery_02_small.jpg
data/images/gallery_01_small.jpg,data/images/gallery_02_small.jpg
我想要的是
data/images/gallery_01_small.jpg
data/images/gallery_02_small.jpg
我怎样才能得到这个?
非常感谢!