exports.definition = {
config : {
// table schema and adapter information
},
extendModel: function(Model) {
_.extend(Model.prototype, {
// Extend, override or implement the Backbone.Model methods
});
return Model;
},
extendCollection: function(Collection) {
_.extend(Collection.prototype, {
}); // end extend
return Collection;
}
}
當我嘗試做var model = Alloy.createCollection('model');
collection.fetch()不會產生拒絕回答,
alert(appointments.fetch());
我沒有得到任何結果。
fetch是異步的。您可以使用'appointments.fetch({success:function(model,response,options){console.log(model,response);}})' – anhulife 2013-02-25 09:49:18