diff options
| author | bolasblack | 2013-07-03 15:51:05 +0800 |
|---|---|---|
| committer | Igor Minar | 2013-07-08 08:55:20 -0700 |
| commit | a7150f1256f2a97a931b3c0d16eab70f45e81cae (patch) | |
| tree | b8c74445e77e116c7a8f0d726596ffc0ab40f2a1 /src/Angular.js | |
| parent | 0d124e190b24e737405b467d4fc11f10047b3d9c (diff) | |
| download | angular.js-a7150f1256f2a97a931b3c0d16eab70f45e81cae.tar.bz2 | |
feat($http): accept function as headers value
So we can request with dynamic header value.
module.factory('Res', [
'$resource'
'$routeParams'
'globalConfig'
function($resource, $routeParams, globalConfig) {
resource('/url/:id', {id: "@id"}, {
patch: {
method: 'patch',
headers: {
'Authorization': function() {
return "token " + globalConfig.token;
}
}
}
});
}]);
Diffstat (limited to 'src/Angular.js')
0 files changed, 0 insertions, 0 deletions
