-
1 votesanswersviews
Sortby Collection BackboneJS与Lodash
我有这样的集合: child {length:3,models:array [3],_ byId:Object} 我想排序模型数组,我像这样使用lodash: var array_of_objects = new ListCollection(); var data = _.sortByOrder(array_of_objects.models, ['id'], ['asc']); 我只得... -
0 votesanswersviews
Backbone.js集合提取,无法检索项目
我按照教程试图使其适应我的需要 .我正在从主应用程序视图调用fetch方法,以便检索要插入集合中的多个对象 . 我可以在chrome中看到返回了json数据,fetch函数返回成功但是没有填充集合 . 我正在使用IcanHaz进行渲染 . 它只打印出我在作业模型中定义的默认模型 . var Job = Backbone.Model.extend({ defaults: { t...