AngularJS: Unknown provider: $$cookieReaderProvider <- $$cookieReader <- $cookies

后端 未结 3 1945
伪装坚强ぢ
伪装坚强ぢ 2021-01-08 00:36

My main module definition:

angular.module(\'app\', [\'app.animators\', 
                       \'app.places\', 
                       \'app.orders\', 
              


        
相关标签:
3条回答
  • 2021-01-08 01:06

    This is because when you initialize module app.services, you forget to inject ngCookies. You only include ngCookies in app, which is a different module.

    A quick fix here is changing your module definition to

    angular.module('app.services', ['ngCookies']).factory('authService', ...
    
    0 讨论(0)
  • 2021-01-08 01:09

    angular-cookie.js version must have the same version that angular.js

    "//code.angularjs.org/X.Y.Z/angular-cookies.js" where X.Y.Z is the AngularJS version you are running.

    0 讨论(0)
  • 2021-01-08 01:14

    If you use angularJs version 1.3 use angular-cookies 1.3.17!

    In my project i have the same problem! So i did a downgrade!

    0 讨论(0)
提交回复
热议问题