它是我的课程的扩展版本,我无法访问新添加的方法。为什么不?
class Form
constructor : (@form) ->
@form = $ @form
ajaxSubmit : ->
$.post @form.attr('action'), @form.serialize(), @submitCallback
submitCallback : (response) ->
$.noop()
class Login extends Form
submitCallback : (response) ->
@good() if response #this.good is not a function
@bad() unless response #this.bad is not a function
good : ->
window.location = @form.attr 'data-go'
bad : ->
@form
.animate({left : -100}, 100)
.animate({left : 50}, 200)
.animate({left : -25}, 400)
.animate({left : 0}, 600)