带有 Angular 的 ASP.NET Core 不更新更改 [英] ASP.NET Core with Angular not updating changes

查看:25
本文介绍了带有 Angular 的 ASP.NET Core 不更新更改的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我按照本教程创建了一个新项目

I have created a new project following this tutorial https://www.youtube.com/watch?v=ytDTkFJOJIE using aspnet core spa templates (angular to be specific).

So when I run "dotnet run" the first time it works fine, it runs the site as to be expected.

Now, when I commit a change, like delete the navbar and the references to it, the "main-server.js" and "main-client.js" don't update, nor does the site in the browser.

What am I doing wrong? If any more info is needed, let me know.

解决方案

I was facing same issue. Below steps worked for me:

  • Delete all files from dist folder
  • run "ng build"
  • When the application runs, if you still don't see the changes, Empty cache and hard reload the chrome browser (hold browser refresh button for long, and select "Empty cache and hard reload")

这篇关于带有 Angular 的 ASP.NET Core 不更新更改的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆