I am attempting to create a request transformation using the $httpProvider in this manner:
angular.module('myApp')
.config(function ($httpProvider,
requestNotificationProvider) {
$httpProvider
.defaults
.transformRequest
.push(function (data) {
requestNotificationProvider
.fireRequestStarted(data);
return data;
});
});
The requestNotificationProvider is designed to execute certain actions, but during debugging, 'data' parameter is showing as undefined in every ajax request. I am trying to access information about the current ajax request.
Is there something incorrect with this code?