Visual Studio 2019-Angular 9.1.9-无实时重装

问题描述

我有一个有角度的项目,该项目由通过Visual Studio通过IIS启动

使用“ npm start”时,修改代码不会重新加载页面,尽管它可以从命令行正常运行

出于技术原因,我需要它通过IIS从Visual Studio运行

如果我转到 ClientApp 文件夹并进行“ ng build” ,然后在Chrome中 CTRL + F5 ,则页面已更新

是错误还是在某处启用了某些功能?

[[False False False]
 [False False False]
 [ True  True  True]]
3
[1 5 8]
[2 4 9]
[[0 1 2]
 [3 5 4]
 [7 8 9]]

谢谢

解决方法

尝试使用类似http-server的服务器并观看。

安装http服务器并通过npm全局监视:

npm install -g http-server watch

watch会侦查目录中文件的更改。如果发生更改,它将执行给定的命令,并且该命令使用http服务器重新加载页面。

您可以在package.json中编辑watch和http-server

相关问答

错误1:Request method ‘DELETE‘ not supported 错误还原:...
错误1:启动docker镜像时报错:Error response from daemon:...
错误1:private field ‘xxx‘ is never assigned 按Alt...
报错如下,通过源不能下载,最后警告pip需升级版本 Requirem...