I want to apply the following transformation to all responses... I can do it one by one, but I have dozens.. so there must be a way to do it globally? I tried injecting it, but I get all sort of errors.
transformResponse: function (data) {
var wrappedResult = angular.fromJson(data);
return wrappedResult.records;
}
I am assuming is wrapping it here.. but I can't figure it out how.
bme.factory('envelopInterceptor', [function () {
return {
};
}]);