Calling coffeescript functions from console

前端 未结 4 994
南旧
南旧 2020-12-29 07:30

Playing a little with coffeescript and Rails 3.1.0.rc4. Have this code:

yourMom = (location) ->
  console.log location

yourMom \"wuz hur\"
4条回答
  •  我在风中等你
    2020-12-29 08:22

    this link might solve your problem Rails - Calling CoffeeScript from JavaScript Wrap your functions in a unique namespace and then you can acess these functions from wnywhere

提交回复
热议问题