-
Notifications
You must be signed in to change notification settings - Fork 79
NG Development Server not refreshing page post Angular 6 upgrade #709
Comments
I was able to find someone who had a very similar issue with the browser not refreshing, but the code was recompiling on save. angular/angular-cli#4329 (comment) I deleted the contents of the /dist folder, which apparently may have been running an old build. After doing so and restarting the project in visual studio, the browser is refreshing. However I'm a little curious as to why I now do not see "** Angular Live Development Server is listening on ..." in my output window anymore. |
Thanks for contacting us, @kakins. |
@kakins I'm afraid I don't know why you're seeing any particular change in behavior, since I don't know how exactly you upgraded from Angular 5 to 6 and what config or file layout changes you made in the process. In general, upgrading from Angular 5 to 6 is a pretty complex process since they changed how the config system works entirely. Our recommended Angular 6 structure is what we're shipping in ASP.NET Core 2.1 as the latest ASP.NET Core + Angular template. If you want to compare this against your version, you can find our sources here: https://github.com/aspnet/Templating/tree/master/src/Microsoft.DotNet.Web.Spa.ProjectTemplates/content/Angular-CSharp @mkArtakMSFT Recommend we close this as there's no indication that we have any defect. |
Thanks @SteveSandersonMS! |
@SteveSandersonMS Understood, and I suppose that makes a little more sense now. Is there any recommended approach for updating a project that was based on a previous version of Angular? I basically went through the Angular update guide (https://update.angular.io/). After that I had to try and find out what changes occurred in the VS template. Like I said, I got it working but I'm almost certain I missed something. It'd be nice if the template repo did something similar as the Angular team, provide a migration document for projects based on earlier versions of the template. |
@kakins I'm afraid there isn't an automated process, but the upgrade guide you've followed covers most of it. Going forwards we're increasingly trying to decouple the ASP.NET Core parts from the Angular parts so that, for example, when it comes time to upgrade to Angular 7+ then even if Angular has changed significantly, it should involve minimal changes on the ASP.NET Core side. It's always a tradeoff between having more integration which lets us create additional conveniences for developers, versus keeping more decoupled which leads to easier upgrades and more standardisation. |
I migrated my project from Angular 5.2 to 6. My project runs now with no errors, however I don't think the development server is behaving correctly.
Whenever I launch in debug, I no longer see that the development server is running in the Debug output.
Secondly, whenever I save a file, the app does not refresh in the browser. I've tried starting the server manually, and it does detect changes made and recompiles. However the browser does not refresh.
Any recommendations of where I might check?
Here is my package.json
The text was updated successfully, but these errors were encountered: