且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

ng服务一次时如何防止自动重新加载页面?

更新时间:2023-12-02 10:48:10

启动你的开发服务器:

ng serve --live-reload false

此处的文档:https://github.com/angular/angular-cli/wiki/服务

如果这不起作用,请执行以下操作:

If that doesn't work then do:

ng serve --live-reload=false

您可以同时运行两个开发服务器,如下所示:

You could run two dev servers at same time as follows:

ng serve // with live reload on port 4200

ng serve --live-reload=false --port=4300 // without live reload on port 4300

这些可以同时运行.