我的发言应该非常简单。 我设立了一个新的收集系统,我想通过这一汇编,在网页上添加收集模式。
get_results: function(){ $.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); } }, render_match: function(model){ console.log(model) },
This returns an error
Uncaught TypeError: undefined is not a function
我的收集工作具有普通结构
_byCid: Object _byId: Object _onModelEvent: function () { [native code] } _removeReference: function () { [native code] } length: 7 models: Array[7] __proto__: o
I ve tried LOTS of things, but one thing that stuck out was maybe I had to pass
this.search_results.models.each(this.render_match);
as that is the actual array, but if I do that I get a Uncaught typeError: Object [object Object],[object Object],...