でコールバックをバインドI次のコードを持っている:BACKBONE.JSとUnderscore.js
initialize: function() {
_.bindAll(this);
var callBack = function(res) {
window.item = new Item(res);
this.render();
};
_.bind(callBack, this);
$.get('/item/parse', {
uri: decodeURIComponent($.urlParam('uri')),
title: decodeURIComponent($.urlParam('title'))
},
callBack
);
},
意図は()$に.get関数が終了した後に呼び出されるべきことは、レンダリングです。しかし、コールバック関数を_.bindでバインドした後でも、コンソールには "Object has no function render"という文字が表示されます。私はここで間違ってバインドを使用していますか?