How do we generate a list of people in the below example programmatically in Ember JS?
{{#each App.peopleController}}
{{#view App.PersonView contentBinding="this"}}
{{content.firstName}} {{content.lastName}}
{{/view}}
{{/each}}
I’ve tried using
App.peopleController.forEach(function(person) {
App.PersonView.create({contentBinding: person}).render();
})
but I got the error ‘data.buffer’ is undefined.
Try v.appendTo(“#container”) instead.