You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Apr 8, 2020. It is now read-only.
Repository navigation
This repository was archived by the owner on Apr 8, 2020. It is now read-only.
.netcore Anguar2: main-server.js and main-client.js are not getting refreshed on component changes #709
Hi,
I am completely new in angular2. While working with .net core angular 2 application (created using ASP.NET Core Angular 2 Starter Application template in visual studio IDE) I came with the issue on refreshing the main-server and main-client.js files.
Any changes I am doing in my component class should get reflected in those two files but this not happening. Hence browser is always loading the old data.
Please help me on this. If any more info required , I will be happy to share you.
Make sure you're running the application in development mode (e.g., with the ASPNETCORE_ENVIRONMENT environment variable set to Development), and haven't disabled the Webpack dev middleware feature.
Thanks Soarc.
I had tried to refresh browser with Ctrl+F5.
Even I switched to another browser ,cleared cache,restarted system. But result is unchanged.
I would be happy if someone tell the process by which main-server.js gets refreshed. Which component is refreshing this ?
@Hyare@SteveSandersonMS did you find any solution for this problem? I have made new angular and reactredux projects from template but as you wrote earlier main-client.js doesnot change. Hot reloading also doesnt work. If i do any change in any tsx file hit f5, ctrlf5,different browser etc it doesnt work. I have tried several times make new projects from template with dotnet new reactredux or angular. it doesnt make any difference. If i debug with hotreload set true, browser fires script errors. What am i doing wrong?
I also tried this in ubuntu 16.04 with netcore 1.1 but result is the same.
@msepici Please see my previous comment. It sounds like you're almost certainly running your app in production mode, whereas you need to be in development mode for these features to be enabled.
I resolved the problem by deleting all the files in the wwwroot\dist folder. Then when I rebuilt the project, the webpack build step created the files again.
Activity
Soarc commentedon Feb 24, 2017
Hi.
Try refreshing browser with Ctrl+F5. This should browser to download js script and not using cached one.
SteveSandersonMS commentedon Feb 24, 2017
Make sure you're running the application in development mode (e.g., with the
ASPNETCORE_ENVIRONMENTenvironment variable set toDevelopment), and haven't disabled the Webpack dev middleware feature.I don't know how far you are into your project, but if it's still early, you might want to consider basing your work on the output from the new
dotnet new angulartemplate as described at https://blogs.msdn.microsoft.com/webdev/2017/02/14/building-single-page-applications-on-asp-net-core-with-javascriptservices/, because that's much more up-to-date than the ASP.NET Core Angular 2 Starter Application.Hyare commentedon Feb 25, 2017
Thanks Soarc.
I had tried to refresh browser with Ctrl+F5.
Even I switched to another browser ,cleared cache,restarted system. But result is unchanged.
I would be happy if someone tell the process by which main-server.js gets refreshed. Which component is refreshing this ?
Thanks,
msepici commentedon Jul 10, 2017
@Hyare @SteveSandersonMS did you find any solution for this problem? I have made new angular and reactredux projects from template but as you wrote earlier main-client.js doesnot change. Hot reloading also doesnt work. If i do any change in any tsx file hit f5, ctrlf5,different browser etc it doesnt work. I have tried several times make new projects from template with dotnet new reactredux or angular. it doesnt make any difference. If i debug with hotreload set true, browser fires script errors. What am i doing wrong?
I also tried this in ubuntu 16.04 with netcore 1.1 but result is the same.
SteveSandersonMS commentedon Jul 10, 2017
@msepici Please see my previous comment. It sounds like you're almost certainly running your app in production mode, whereas you need to be in development mode for these features to be enabled.
kornakar commentedon May 3, 2018
I resolved the problem by deleting all the files in the wwwroot\dist folder. Then when I rebuilt the project, the webpack build step created the files again.