Chapter 11: Data Transformation and APIs
Integrating with backend APIs and transforming data between backend and UI models.
- Model adapter
- Response mapping
- Error interceptor
What you can try in this demo
Five demos deal with APIs that do not match the UI: mismatched formats, the Model-Adapter pattern, and responses mapped into application models. Errors are handled centrally by an HTTP interceptor, with per-request control through HttpContext. Everything runs against a fake backend, so no server is needed.
This demo is chapter 11 of Modern Angular Design Patterns. The book walks through the code behind it.
Buy the book