2

I'm trying to setup hot reloading for an ASP.NET MVC 5 application along with Angular 11.

What I have already achieved:

  1. I'm referring to application bundles in Index.cshtml like this:

enter image description here

  1. I'm hosting Angular 11 application like this:

     ng serve --public-host=https://localhost:4200 --ssl --hmr
    

After I serve the Angular app and run the ASP.NET MVC project, it loads the application nicely. However there is only Live Reloading enabled, not HMR.

I know that HMR is running fine since when I open Angular app at localhost:4200, it maintains input value after updating some text on landing page:

enter image description here

However on the ASP.NET MVC page that is using bundles, whole page is reloaded after bundles change, but state is not maintained...

What I need: I need the ASP.NET MVC page too keep the state after bundle changes. To not have just Live Reloading, but Hot Module Reloading

Does anyone know what am I missing in the setup to enable HMR?

marc_s
  • 732,580
  • 175
  • 1,330
  • 1,459
skywatcher
  • 31
  • 1
  • 4

0 Answers0