0
비디오 플레이어와 비디오 목록을 렌더링하는 뷰가 있습니다.백본에 인수 전달 .bind() function
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();
}
},보기에 내 초기화 기능입니다
. 나는 점점 오전 문제는 내가 라인 bind 함수 오류
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);
인수를 취 백본을 준수 할 수있는 기능을 지정하는 올바른 방법은 무엇입니까?