Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/angular/27.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
&引用;为什么angular 5正在运行(http://127.0.0.1:5500/src/index.html)浏览器上没有显示任何内容”;_Angular - Fatal编程技术网

&引用;为什么angular 5正在运行(http://127.0.0.1:5500/src/index.html)浏览器上没有显示任何内容”;

&引用;为什么angular 5正在运行(http://127.0.0.1:5500/src/index.html)浏览器上没有显示任何内容”;,angular,Angular,“我已经使用angular/cli启动了我的项目,它在localhost 127.0.0.1:4200上运行良好,但几天后我重新启动了我的项目,它在localhost:127.0.0.1:5500上运行,在我的vs代码上运行live server后,没有显示任何内容。” “我已尝试手动将端口从5500更改为4200默认值,但不幸的是,它不起作用”您不必从Vscode运行live server。如果你跑 ng serve -o 或 它将使用默认端口4200在默认浏览器中自动运行您是否尝试使用ng

“我已经使用angular/cli启动了我的项目,它在localhost 127.0.0.1:4200上运行良好,但几天后我重新启动了我的项目,它在localhost:127.0.0.1:5500上运行,在我的vs代码上运行live server后,没有显示任何内容。”


“我已尝试手动将端口从5500更改为4200默认值,但不幸的是,它不起作用”

您不必从Vscode运行live server。如果你跑

ng serve -o


它将使用默认端口4200在默认浏览器中自动运行

您是否尝试使用ng serve-o它将使用您的4200端口自动运行谢谢,在我使用“ng-start”启动我的项目后,它正在工作
ng serve --open