[model][m]: (fixes #6) create a BackendMemory (local data in memory) and refactor code to use this rather than current hard-coding-of-data approach.
This commit is contained in:
@@ -13,10 +13,8 @@ recline.DataTable = Backbone.View.extend({
|
||||
|
||||
initialize: function() {
|
||||
var that = this;
|
||||
this.model.fetch({
|
||||
success: function(collection, resp) {
|
||||
that.render()
|
||||
}
|
||||
this.model.fetch().then(function() {
|
||||
that.render()
|
||||
})
|
||||
},
|
||||
toTemplateJSON: function() {
|
||||
@@ -37,4 +35,4 @@ recline.DataTable = Backbone.View.extend({
|
||||
$(this.el).html(htmls);
|
||||
return this;
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user