핸들 막대 템플릿에서 BackboneJS로 레일에서 작업하고 있습니다.잡히지 않은 유형 오류 : this.template이 함수가 아닙니다. Backbonejs
여기 이상한 오류를 얻고있다 .. 을이되어 내 헤더보기
class App.Views.Header extends Backbone.View
className: "navbar-inner"
template: HandlebarsTemplates['app/templates/header']
render: ->
@$el.html(@template())
@
기본 응용 프로그램 파일입니다이
#= require_self
#= require_tree ./templates
#= require_tree ./views
#= require_tree ./routers
window.App =
Routers: {}
Views: {}
Collections: {}
Models: {}
initialize: ->
new App.Routers.MainRouter()
Backbone.history.start()
내 주요 라우터 파일이
class App.Routers.MainRouter extends Backbone.Router
routes:
"": "index"
initialize: ->
@headerView = new App.Views.Header()
index: ->
$("#header").html(@headerView.render().el)
한다
내가 localhost:3000
에 도착했을 때 ..이 오류가 발생했습니다. Uncaught TypeError: this.template is not a function
..한다는 점에서
암 완전히 붙어 어떤 도움이 이해할 수있을 것이다 감사
'template : HandlebarsTemplates [ 'header']'this works worked – ijunaidfarooq