Angular2Spa template: Server-side prerendering doesn't work properly #1191

Closed
opened 2025-08-09 17:19:12 +00:00 by fergalmoran · 0 comments
Owner

Originally created by @TarasBanakh on 12/10/2016

In Angular2Spa template:

Make the Web API method WeatherForecasts slower with System.Threading.Thread.Sleep(TimeSpan.FromSeconds(3));

Then when I navigate to 'Fetch data' page I can see a message "Loading..." which in this case means that the angular is performing an ajax request from browser to get data. But this page should have been prerendered on server!

Another strange thing with server-side prerendering is that when I refresh (F5) the 'Fetch data' page then the Web API method WeatherForecasts is called twice: once from server (when prerendering) and once from browser.

*Originally created by @TarasBanakh on 12/10/2016* In Angular2Spa template: Make the Web API method WeatherForecasts slower with System.Threading.Thread.Sleep(TimeSpan.FromSeconds(3)); Then when I navigate to 'Fetch data' page I can see a message "Loading..." which in this case means that the angular is performing an ajax request from browser to get data. But this page should have been prerendered on server! Another strange thing with server-side prerendering is that when I refresh (F5) the 'Fetch data' page then the Web API method WeatherForecasts is called twice: once from server (when prerendering) and once from browser.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github/JavaScriptServices#1191
No description provided.