AngularJS Error: $injector:unpr Unknown Provider

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

    app.factory('getSettings', ['$http','$q' /*here!!!*/,function($http, $q) {
    

    you need to declare ALL your dependencies OR none and you forgot to declare $q .

    edit:

    controller.js : login, dont return ""

提交回复
热议问题