AngularJS Error: $injector:unpr Unknown Provider

后端 未结 13 922
爱一瞬间的悲伤
爱一瞬间的悲伤 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 09:04

    I got this error writing a Jasmine unit test. I had the line:

    angular.injector(['myModule'])
    

    It needed to be:

    angular.injector(['ng', 'myModule'])
    

提交回复
热议问题