var Model_1 = Backbone.Model.extend({
idAttribute: 'house_id',
initialize: function(model, option) {
debugger;
console.log('model initialize');
console.dir(arguments);
}
});
var option = {
age: 15
};
var m_1 = new Model_1(data_1[0], option);
------------------------------------------------------------------------
var Model_1 = Backbone.Model.extend({
idAttribute: 'house_id'
});
var option = {
age: 15,
model: Model_1 // 直接附加
};
var dataList_1 = _.bbc({
initialize: function(models, option) {
debugger;
console.log('collection initailize');
console.dir(arguments);
}
}, data_1, option);