evertonrobertoauler / cli-universal-demo

80 stars 18 forks source link

http transfer state #19

Closed kalyan1102 closed 7 years ago

kalyan1102 commented 7 years ago

Hi,

I am trying to get data server side when I am using view source of the page those data is not included and its works as client side http request. Can you please guide me what I am missing as in all the other universal demos if you call a service in server side those are included in the rendered page not through client side http calls.

ysus commented 7 years ago

i have the same problem with rendering on server side, http requests not display... Just 'view source' everthing that comes from http request not displayed like: title, code, description, etc...

evertonrobertoauler commented 7 years ago

Hi, If you are using angular Http service, your data should be rendering on the server as it does in the client, here in this branch medium-http-example, I have one example: https://github.com/evertonrobertoauler/cli-universal-demo/blob/medium-http-example/src/app/app.component.ts Some times when the http call takes some seconds to finish, the angular SSR method will ignore it, and return the html without data.