Music Store does not update rendered html when you change the project. #1601

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

Originally created by @felipedrumond on 5/24/2016

I added the following code to the home.ts

public timeNow: string = new Date().toLocaleTimeString() + ':' + new Date().getSeconds().toString();

and I display it on home.html. However, that it does not update the timeNow value when I refresh the page. This will surely cause problems when developing because changes do not take place when you change the code, even if you run gulp or keep "dotnet run" command running.

The only solution for this issue is to change this code in Index.cshtml from this

<cache vary-by="@Context.Request.Path"> <app asp-prerender-module="wwwroot/ng-app/boot-server">Loading...</app> @await Html.PrimeCache(Url.Action("GenreMenuList", "GenresApi")) @await Html.PrimeCache(Url.Action("MostPopular", "AlbumsApi")) </cache>
to this:

<app asp-prerender-module="wwwroot/ng-app/boot-server">Loading...</app> @await Html.PrimeCache(Url.Action("GenreMenuList", "GenresApi")) @await Html.PrimeCache(Url.Action("MostPopular", "AlbumsApi"))

*Originally created by @felipedrumond on 5/24/2016* I added the following code to the home.ts `public timeNow: string = new Date().toLocaleTimeString() + ':' + new Date().getSeconds().toString();` and I display it on home.html. However, that it does not update the timeNow value when I refresh the page. This will surely cause problems when developing because changes do not take place when you change the code, even if you run gulp or keep "dotnet run" command running. The only solution for this issue is to change this code in Index.cshtml from this `<cache vary-by="@Context.Request.Path"> <app asp-prerender-module="wwwroot/ng-app/boot-server">Loading...</app> @await Html.PrimeCache(Url.Action("GenreMenuList", "GenresApi")) @await Html.PrimeCache(Url.Action("MostPopular", "AlbumsApi")) </cache> ` to this: `<app asp-prerender-module="wwwroot/ng-app/boot-server">Loading...</app> @await Html.PrimeCache(Url.Action("GenreMenuList", "GenresApi")) @await Html.PrimeCache(Url.Action("MostPopular", "AlbumsApi"))`
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github/JavaScriptServices#1601
No description provided.