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, {
// Implement the comparator method.
comparator : function(book) {
return book.get('title');
}
}); // end extend
return Collection;
}
}
我應該在哪裏指定url屬性以與我的休息服務進行通信。指定URL或URLRoot屬性 - backbone.js
http://docs.appcelerator.com/titanium/latest/#!/guide/Alloy_Models