access twice on first load of fetch data #439

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

Originally created by @chencingyen on 9/7/2017

In angular spatemplate, i try to put breakpoint in "api/SampleData/WeatherForecasts", the app will fetch it twice from that API if i directly access http://localhost:58498/fetch-data

any idea how to make the app fetch only once? in the prerender time only?

second question is... if i have a empty-textbox inside one of my component, immediately after the browser load only the html (server finished to prerender), the i try to put some text in the textbox... then after web-browser get the javascript, the value i typed recently in the textbox is gone... any idea how to make it right?

thanks in advanced

*Originally created by @chencingyen on 9/7/2017* In angular spatemplate, i try to put breakpoint in "api/SampleData/WeatherForecasts", the app will fetch it **twice** from that API if i directly access http://localhost:58498/fetch-data any idea how to make the app fetch only **once**? in the prerender time only? second question is... if i have a **empty-textbox** inside one of my component, immediately after the browser load only the html (server finished to prerender), the i try to put some text in the textbox... then after web-browser get the javascript, the value i typed recently in the textbox is gone... any idea how to make it right? thanks in advanced
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github/JavaScriptServices#439
No description provided.