Skip to content

Instantly share code, notes, and snippets.

View revuls's full-sized avatar

Cesar Redondo revuls

View GitHub Profile
@krainet
krainet / cInterceptor.js
Created January 17, 2016 10:54
Interceptor angular para Walladog
/*
* Intercept all requests /responses
* Ej. use to auth-tokens in headers
*/
angular.module('cInterceptor', [])
.factory('cInterceptor', ['$q', '$rootScope', function ($q, $rootScope) {
return {
'request': function (config) {
config.headers = config.headers || {};