Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Сoffee does not work when "grunt serve:dist" #66

Closed
alexsuslov opened this issue Jan 27, 2014 · 3 comments
Closed

Сoffee does not work when "grunt serve:dist" #66

alexsuslov opened this issue Jan 27, 2014 · 3 comments

Comments

@alexsuslov
Copy link

OS X:

init

yo angular-fullstack --coffee --jade
  • all yes ;)
grunt serve:dist

Chrome console:

Uncaught Error: [$injector:unpr] Unknown provider: aProvider <- a <- Auth
@snowman-repos
Copy link

I got this too. It's a minification error - you just need to make sure your angular files are setup like this

angular.module('myApp')
    .controller 'MyCtrl', ['$dependency', ($dependency) ->
        // code
    ]

and not like this:

angular.module('myApp')
    .controller 'MyCtrl', ($dependency) ->
        // code

@DaftMonk
Copy link
Member

Thanks for pointing this out.

@darryl-snow It is a minification error, but you shouldn't have to annotate your controllers/services like that, it should be done automatically by ngMin. Turns out there's a non-standard declaration of the Auth service that's tripping up ngMin.

It is this:

.factory 'Auth', Auth = ($location, $rootScope, Session, User, $cookieStore) ->

It should be this

.factory 'Auth', ($location, $rootScope, Session, User, $cookieStore) ->

I'll update this tomorrow and release a few other bug fixes.

@alexsuslov
Copy link
Author

Yes it angularJs minification hack.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants