Skip to content
This repository was archived by the owner on Apr 8, 2020. It is now read-only.
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

Closed

Description

@Hyare

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.

Activity

  1. Soarc commented on Feb 24, 2017

    @Soarc

    Hi.
    Try refreshing browser with Ctrl+F5. This should browser to download js script and not using cached one.

  2. SteveSandersonMS commented on Feb 24, 2017

    @SteveSandersonMS
    Member

    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.

    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 angular template 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.

  3. Hyare commented on Feb 25, 2017

    @Hyare
    Author

    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,

  4. msepici commented on Jul 10, 2017

    @msepici

    @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.

  5. SteveSandersonMS commented on Jul 10, 2017

    @SteveSandersonMS
    Member

    @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.

  6. kornakar commented on May 3, 2018

    @kornakar

    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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions