I want get cookie value and set to a provider. This post https://stackoverflow.com/a/20415679/772481 mentioned $cookiesProvider. But how do I use it?
mod.con
You can inject $cookies manually:
$cookies
myApp.config(function() { var $cookies; angular.injector(['ngCookies']).invoke(['$cookies', function(_$cookies_) { $cookies = _$cookies_; }]); // here you can use $cookies as usual });