Apollonas
Apollonas

Reputation: 667

ASP.NET Core MVC + Angular SPA Template + Docker Support: Changing html content does not refresh live on the browser

Scenario: I created an ASP.NET Core 2.1 project in Visual Studio 2017. I selected the Angular SPA template and then added Docker Orchestration Support.

Expected Result: When running the application in debug mode in a container, I expect the changes I am making in the html content to be visible on the browser when I hit refresh.

Actual Result: Live Preview is not working. I do know that if I run the application on localhost, Live Preview works. I also know that regular ASP.NET MVC Core apps without Angular, running in a container also support live preview.

Is there something I am missing or Live Preview is not supposed to work for my scenario? If that is true it is unfortunate because if I have to rebuild the container every time I make a UI change I will lose a lot of time.

Upvotes: 0

Views: 491

Answers (1)

James
James

Reputation: 1013

I was able to get the live updating of changes to Angular pages with Docker support in Visual Studio 2017 by using:

ng build --watch

instead of:

ng serve --watch

I no longer have to run

ng build

after every change.

Hope this helps!

Upvotes: 0

Related Questions