我有继承的主干视图:
class App.Views.User.Base extends Backbone.View
el: '#main'
initialize: ->
events:
'click .save': 'save'
render: ->
@$el.html @template user: @model
@
class App.Views.User.Registration extends App.Views.User.Base
template: JST['template/users/registration']
save: ->
if not @model.expired()
@model.save {},
error: (model, response) ->
console.log response.responseText
当我试图渲染这个时:
(new FancySurvey.Views.User.Registration(model: model)).render()
我得到了错误:
Property 'template' of object #<Registration> is not a function
可能是什么问题?谢谢