我们如何在 Ember JS 中以编程方式生成以下示例中的人员列表?
{{#each App.peopleController}}
{{#view App.PersonView contentBinding="this"}}
{{content.firstName}} {{content.lastName}}
{{/view}}
{{/each}}
我试过使用
App.peopleController.forEach(function(person) {
App.PersonView.create({contentBinding: person}).render();
})
但我得到错误'data.buffer'未定义。