1
我想实现分页到这个简单的web app。分页与backbone.js
我看到可以使用backbone.paginator,但在使用此组件之前,我想知道使用backbone.js实现分页的最简单最简单的方法是什么。
这里一点点的代码:
请参阅在APPVIEW
评论的观点
var AppView = Backbone.View.extend({
initialize: function() {
items.fetch(); // <-- now it fetches all the data,
// I would like to set a limit
}
});
的collecti在
var ItemsCollection = Backbone.Collection.extend({
model: item
模型
var ItemModel = Backbone.Collection.extend({
return ItemModel;
});