angularAMD icon indicating copy to clipboard operation
angularAMD copied to clipboard

unknown provider

Open juunp opened this issue 8 years ago • 0 comments

When trying to load a factory into a controller, i get an "unknown provider" error from angularJS.

I reproduced the error and the load structure from my project in this plnkr

Notes:

  • I do not load the app with

    deps: ['app']

because I need to load some js libraries before the app.

  • The module is already loaded when app is at "run" stage but without bServ factory which is defined in another file and there is no problem with aServ factory (defined in module file)
  • The file where is bServ is loaded (seen in network panel)

edit: I found a workaround.

I declare problematic services with:

angularAMD.factory('bServ', bServ);

juunp avatar Aug 23 '17 13:08 juunp