【发布时间】:2012-01-14 21:06:14
【问题描述】:
我有什么应该很简单的。我创建了一个新集合,我想将它传递给渲染并将集合模型添加到页面。
获取结果:函数(){ $.getJson(this.url,function(response){ this.search_results = new Kitchon.Collections.searchList(response); console.log(this.search_results); this.search_results.each(this.render_match); } }, 渲染匹配:函数(模型){ 控制台日志(模型) },这会返回一个错误
Uncaught TypeError: undefined is not a function
我的收藏有一个普通的结构
_byCid:对象 _byId:对象 _onModelEvent: function () { [本机代码] } _removeReference: function () { [本机代码] } 长度:7 型号:数组[7] __proto__:o我尝试了很多东西,但最突出的一件事是我可能不得不通过
this.search_results.models.each(this.render_match); 因为那是实际的数组,但如果我这样做,我会得到一个 Uncaught typeError: Object [object Object],[object Object],...
【问题讨论】: