I'm using this template for my startup. It's a simple application that displays different restaurants on the map. A User can go to same restaurant and check details. On the server side I have an WEB API and for restaurant details page it looks like this: /api/unit/{Id} and returns a simple JSON. Universal renders the page on the server side and provides html document for the client. But then I can see that angular application uses the API and makes the same request on the server. I think we can avoid using the same API request to the server because all necessary data already in this html. For example right requests look like this:
and contain an extra request on the client side:

I think the request should look like this (without /api/unit/{id}):

The problem could be fixed with this solution https://github.com/angular/universal/tree/master/modules/common
I'm using this template for my startup. It's a simple application that displays different restaurants on the map. A User can go to same restaurant and check details. On the server side I have an WEB API and for restaurant details page it looks like this: /api/unit/{Id} and returns a simple JSON. Universal renders the page on the server side and provides html document for the client. But then I can see that angular application uses the API and makes the same request on the server. I think we can avoid using the same API request to the server because all necessary data already in this html. For example right requests look like this:
and contain an extra request on the client side:


I think the request should look like this (without /api/unit/{id}):
The problem could be fixed with this solution https://github.com/angular/universal/tree/master/modules/common