Created
January 5, 2016 09:14
-
-
Save HelenaEksler/26da0ce031c1e7a1f535 to your computer and use it in GitHub Desktop.
Add debug into Angular app.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$httpProvider.interceptors.push(function ($q, Auth, localStorageService, $injector) { | |
return { | |
'request': function (config) { | |
var concatWith = /\?/.test(config.url) ? '&' : '?'; | |
if (config.url != 'template/pagination/pagination.html') { | |
config.url += concatWith + 'XDEBUG_SESSION_START=14394'; | |
} | |
if (!config.url.match(/login-token/)) { | |
config.headers = { | |
'access-token': localStorageService.get('access_token') | |
}; | |
} | |
return config; | |
}, |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment