AngularJS request/response transformers

The job of a transformer or a transformer function is to transform the input data from one format to another. These transformers plug into the HTTP request/response processing pipeline of Angular and can alter the message received or sent. A good example of the transformation function usage is AngularJS global transformers that are responsible for converting a JSON string response into a JavaScript object and vice versa.

Since data transformation can be done while making a request or processing a response, there are two transformer pipelines available, one for a request and another for a response.

Transformer functions can be registered:

  • Globally for all requests/responses. The standard JSON string-object transformers ...

Get AngularJS by Example now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.