0
私はビデオプレーヤーとビデオリストをレンダリングするビューを持っています。バックボーンに引数を渡す.bind()関数
initialize: function() {
var q = window.location.search.slice(3);
this.videos = new Videos(window.exampleVideoData);
this.videos.bind('select', this.notifyAppView, this);
if (q){
this.videos.bind('fetchFinished', function(){
console.log('should still work');
this.render();
}, this);
// Any time this.videos collection changes we will re-render
this.videoPlaying = this.videos.models[0];
this.videos.fetch(q);
}else{
//Collection of all videos
// Any time this.videos collection changes we will re-render
this.videoPlaying = this.videos.models[0];
this.render();
}
}、ビューの私の初期化関数である
。私は取得しています問題は、私はラインでバインド機能、エラー
app.js:10 Uncaught SyntaxError: Unexpected string
に引数を渡すとき:
this.videos.bind('fetchFinished', function(){
console.log('should still work');
this.render();
}、この);
我々はそうのような関数に文字列を渡すときに我々は、エラーを取得:
this.videos.bind('fetchFinished', function('adfadf'){
console.log('should still work');
this.render();
}, this);
引数を取り骨格とバインドする機能を、指定する正しい方法は何ですか?