Although I have had success using straight coffeescript in my development environment, I recently encountered issues when trying to incorporate AngularJS. It seems that my current setup is not running correctly with coffeescript.
Here's what works:
//Jade:
script(type='text/javascript', src='/js/coffee-script.js')
script(type='text/javascript', src='https://ajax.googleapis.com/ajax/libs/angularjs/1.0.7/angular.min.js')
script(type='text/javascript', src='/js/grndCntrl.js')
However, this does not work:
//Jade:
script(type='text/javascript', src='/js/coffee-script.js')
script(type='text/javascript', src='https://ajax.googleapis.com/ajax/libs/angularjs/1.0.7/angular.min.js')
script(type='text/coffeescript', src='/js/grndCntrl.coffee')
I am confident that my coffeescript translation is valid and functions properly when converted to JS. My suspicion is that the issue lies in coffee-script.js not converting the file before Angular processes it, although I don't fully understand how this process works.
Does anyone have any suggestions on how to efficiently write coffeescript for Angular?