angular-ssr icon indicating copy to clipboard operation
angular-ssr copied to clipboard

The blog content disappear when I refresh the page.(demand-express example) 

Open ElderJames opened this issue 8 years ago • 7 comments

I run the demand-express example by excuting the command npm start and access http://localhost:8080/blog/1,then the blog content appear but it disappear when I refresh the page.But when I access the url in new tab,it appear again.

ElderJames avatar Aug 05 '17 13:08 ElderJames

same here :\

wnabil avatar Aug 15 '17 13:08 wnabil

+1, the same here too....

abdalrhman-alhomsi avatar Aug 15 '17 14:08 abdalrhman-alhomsi

After looking at the main cause of this problem I notice that it is related to the Angular/preboot. as a temp fix for this I commented out this line : setImmediate(() => prebootClient().complete()); inside the root.module.ts file and the problem was gone.

wnabil avatar Aug 17 '17 15:08 wnabil

Unfortunately I cannot reproduce this. Can you tell me what the initial HTTP request gives back in its body? Anyone - @ElderJames @wnabil @abdalrhman-alhomsi

clbond avatar Sep 18 '17 23:09 clbond

I tested the example app and also has the same behavior, I think there is something wrong with preboot.

wnabil avatar Sep 19 '17 11:09 wnabil

I have removed the setImmediate call in the example as it was unnecessary. Does this fix your issue? Maybe you are using an old Chrome that doesn't have setImmediate?

clbond avatar Oct 21 '17 00:10 clbond

My chrome is at latest version and this issue happened also on firefox for me not only chrome. Yes removing setImmediate works but also need to remove builder.preboot(true); in server/index.ts.

wnabil avatar Oct 22 '17 09:10 wnabil