文檔具有使用ArrayController
這個模板的一個例子:Ember.js中的ArrayController有什麼意義?
{{#each MyApp.listController}}
{{firstName}} {{lastName}}
{{/each}}
這是怎麼ArrayController
用於:
MyApp.listController = Ember.ArrayController.create();
$.get('people.json', function(data) {
MyApp.listController.set('content', data);
});
如何將這項工作不同於使用普通數組像這樣代替?
MyApp.listController = [];
$.get('people.json', function(data) {
MyApp.set('listController', data);
});