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

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

问题描述

我已按照本教程 https://www.youtube.com/watch创建了一个新项目?v = ytDTkFJOJIE 使用aspnet核心spa模板(具体角度).

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

因此,当我第一次运行"dotnet run"时,它可以正常运行该网站.

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

现在,当我提交更改时,例如删除导航栏及其引用,"main-server.js"和"main-client.js"不会更新,浏览器中的站点也不会更新.

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:

  • 删除dist文件夹中的所有文件
  • 运行"ng build"
  • 应用程序运行时,如果仍然看不到更改,请清空缓存并重新加载chrome浏览器(长按浏览器刷新按钮,然后选择清空缓存并重新加载")

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

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