0

My prefered development environment is straight coffeescript and this has treated me well until I started getting into AngularJS. For some reason my current setup will not run correctly with coffeescript.

Here's the deal, this 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')

but not this:

//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 know that my coffeescript translation is valid and if I convert that coffeescript to js it works just fine in the js file.

What I suspect is that it has something to do with coffee-script.js not converting the file before Angular gets ahold of it, but I really don't have much of a grasp how that works.

Any suggestions on how to get back to write coffeescript for Angular??

2
  • 1
    Is there a reason you do not precompile to javascript? It eliminates a dependency and these side effects. Commented Jul 27, 2013 at 1:33
  • See my answer and comment on a similar question. Commented Jul 27, 2013 at 13:24

1 Answer 1

0

I just started using Grunt to pre-compile with grunt-watch and grunt-coffee

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.