Skip to content

Instantly share code, notes, and snippets.

@jayrmotta
Created May 8, 2015 21:11
Show Gist options
  • Save jayrmotta/166470d53da13379ab56 to your computer and use it in GitHub Desktop.
Save jayrmotta/166470d53da13379ab56 to your computer and use it in GitHub Desktop.
AngularJS deserialization using JSOG
$httpProvider.defaults.transformResponse.splice(0, 0, function(data, headersGetter) {
if (data && headersGetter()['content-type'] === 'application/json') {
return JSOG.parse(data);
}
return data;
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment