Angular Server Side Rendering State Transfer For HTTP Requestsby@printfmyname
4,598 reads

Angular Server Side Rendering State Transfer For HTTP Requests

tldt arrow
Read on Terminal ReaderPrint this storyRead this story w/o Javascript

Too Long; Didn't Read

This tutorial extends the SSR explained on Server-side rendering (SSR) with Angular Universal page. Our goal is to store data received from SSR and reuse them without making any network requests. We create a HttpInterceptor to intercept SSR HTP requests and store results on TransferState service. This data store is serialized and passed to the client-side with the rendered page. All the requests you do will go through this interceptor. On the above example, I save all successful HttpResponses on to the state store.

Company Mentioned

Mention Thumbnail
featured image - Angular Server Side Rendering State Transfer For HTTP Requests
react to story with heart

RELATED STORIES

L O A D I N G
. . . comments & more!
Hackernoon hq - po box 2206, edwards, colorado 81632, usa