paint-brush
Angular Server Side Rendering State Transfer For HTTP Requestsby@printfmyname
6,640 reads
6,640 reads

Angular Server Side Rendering State Transfer For HTTP Requests

by Hari Ya6mOctober 7th, 2020
Read on Terminal Reader
Read this story w/o Javascript
tldt arrow

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
Hari Ya HackerNoon profile picture
Hari Ya

Hari Ya

@printfmyname

L O A D I N G
. . . comments & more!

About Author

Hari Ya HackerNoon profile picture
Hari Ya@printfmyname

TOPICS

THIS ARTICLE WAS FEATURED IN...

Permanent on Arweave
Read on Terminal Reader
Read this story in a terminal
 Terminal
Read this story w/o Javascript
Read this story w/o Javascript
 Lite