Skip to content

Instantly share code, notes, and snippets.

@jbrowning
Last active April 25, 2016 23:38
Show Gist options
  • Save jbrowning/9527280 to your computer and use it in GitHub Desktop.
Save jbrowning/9527280 to your computer and use it in GitHub Desktop.
Angular & CoffeeScript: Error: [ng:areq] Argument 'fn' is not a function, got Object
# The $provide service is used to override an injected dependency
# Bad - results in Error: [ng:areq] Argument 'fn' is not a function, got Object
module 'someModule', ($provide) ->
$provide.value "SomeService", SomeMock
# Good
module 'someModule', ($provide) ->
$provide.value "SomeService", SomeMock
null
@sonicoder86
Copy link

so much win for CoffeeScript

@ryu1kn
Copy link

ryu1kn commented Feb 28, 2015

Thanks πŸ‘

@iurii-kondratiuk-zz
Copy link

Thank you. It's very helpful!!

@beholderrk
Copy link

Thanks πŸ‘

@damien-m
Copy link

Another victim of coffeescript to add to the list!
Thanks!
πŸ‘

@quidproquo
Copy link

You just saved me a ton of time, thanks!

@bennythomps
Copy link

Thank you! πŸ‘

@fniewijk
Copy link

fniewijk commented Oct 9, 2015

Cheers! πŸ‘

@nicgirault
Copy link

Thank you!

@wwwdata
Copy link

wwwdata commented Nov 25, 2015

holy shit this saved my day too thanks πŸ‘
u really shouldnt use coffeescript just because of these implicit returns ..

@chrisdambrosio
Copy link

tips hat

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment