Skip to content

Auth factory injection problem #371

@xeTaiz

Description

@xeTaiz

Hi,
creating a new angular-fullstack app with CoffeeScript and any authentication should create the 'Auth' factory in client/components/auth/.

I guess you simply translated the JS to CoffeeScript in your generator, because it does something like that:

what should be
angular.module(...).factory('Auth', function Auth (....){..})

in JS, is then created as that in CS:
angular.module(...).factory 'Auth', Auth = (....)-> ....

I'm not 100% sure how an assignment is handled as an argument in JS, but obviously it does not pass the function then, because I get an injection error.
Simply leaving out the name of the function fixes the problem.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions