I'm trying to implement an authentication system with Angular + json web token, but how much do I try to make a $http.interceptors.push('nomeDo Interceptor')
show error in the application and in the browser console does not show any errors.
Follow some parts of the code.
The interceptor
angular.module('digApp').factory('authInterceptor', function(){
return {
request: function(config){
console.log(config);
return config;
}
}
});
The Interceptor Setting
angular.module('digApp').config(function($httpProvider){
$httpProvider.interceptors.push("authInterceptor");
});
For now I'm only displaying what comes from the config, but it is not working, the application blocks the link requests that it does to api . And it does not show console.log () , nor does it load ng-view views ;
If someone has a good tutorial Angular Login System + jwt + nodejs I am grateful.