0
Получение ошибки Uncaught Error: [$injector:cdep]
in Angularjs service loading.AngularJS: при нагрузке вопрос
Ниже приводится service.js
App.factory('myHttpInterceptor', ['Service', function(Service) {
var myHttpInterceptor = {
request: function(config) {
if (!Service.isAnonymus) {
config.headers['X-CSRFToken'] = Service.token;
}
return config;
}
};
return myHttpInterceptor;
}]);
App.config(['$httpProvider', function($httpProvider) {
$httpProvider.interceptors.push('myHttpInterceptor');
}]);