我是新來的咖啡標記,並有一個關於訪問函數的問題。Coffeescript訪問函數
鑑於以下代碼,我將如何從構造函數的for循環訪問checkType函數?
class ApplicationForm.Save
constructor: (@formItems) ->
@that = this
for item in @formItems
do ->
checkType(item)
checkType: (forItem) ->
console.log(@formItem.find("input").length)
你爲什麼這樣做'@that = this'? (轉換爲'this.that = this') – Mathletics