AngularJS Error: $injector:unpr Unknown Provider

后端 未结 13 914
爱一瞬间的悲伤
爱一瞬间的悲伤 2020-12-13 08:10

I\'m trying to build my own service by following the example in the documentation for the factory methodology. I think I\'ve done something wrong however because I continue

13条回答
  •  粉色の甜心
    2020-12-13 08:54

    In my case, I added a new service (file) to my app. That new service is injected in an existing controller. I did not miss new service dependency injection into that existing controller and did not declare my app module no more than one place. The same exception is thrown when I re-run my web app and my browser cache is not reset with a new service file codes. I simply refreshed my browser to get that new service file for browser cache, and the problem was gone.

提交回复
热议问题