이 백본 예제에서 항목 변수가 정의되지 않은 이유는 무엇입니까? 여기백본이 각각 정의되지 않음
var Action = Backbone.Model.extend({
defaults: {
"selected": false,
"name": "First Action",
"targetDate": "10-04-2014"
}
});
var Actions = Backbone.Collection.extend({
model: Action
});
var actionCollection = new Actions([new Action(), new Action(), new Action(), new Action()]);
_.each(actionCollection, function(item) {
alert(item);
});
jsFiddle 님의 http://jsfiddle.net/netroworx/KLYL9/