0

我们如何在 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'未定义。

4

1 回答 1

1

尝试 v.appendTo("#container") 代替。

于 2012-05-14T02:49:44.747 回答