3
이 내 application.js 여기백본 라우터에서이 오류를 어떻게 처리합니까?
window.PackageViewer = new Backbone.Router.extend({
routes : {
'':'home'
},
initialize:function(){
this.collection = new Package();
},
home:function(){
$('body').append("<h1>Welcome</h1>");
}
});
의 다른 packageviewer.js를 호출
window.App = {
init: function() {
this.router = new PackageViewer();
Backbone.history.start();
}
};
이
파일 그리고 여기 내<body>
<script type="text/javascript">
$(document).ready(function(){
App.init();
});
</script>
내 index.html을의 스크립트 태그입니다 즉
실행할 때 TypeError: 'undefined' is not a function (evaluating 'parent.apply(this, arguments)')
나는 이것을 이해할 수 없다. 도움!
@rulfzid .. 감사합니다. – JABD