我将模型发送到模板。该模型有一个集合。在模板我赞同一些变量和函数:集合在模板中不起作用
console.log(comments);
console.log(_.size(comments));
console.log(comments instanceof App.Collections.Comments);
console.log(_.pluck(comments, 'created'));
_.each(comments, function(com) {
console.log(com);
});
前三的工作,但最后两个下划线功能没有。 Pluck给出3个未定义的值,每个值都不重复。
Object { length=3, models=[3], _byId={...}, more...}
3
true
[undefined, undefined, undefined]
如何获得下划线功能?
保存我的一天!日Thnx! – GijsjanB 2012-04-04 09:50:13