[转]如何将Angular localhost:4200 改为IP

本文转自:https://blog.csdn.net/ygznx/article/details/78249118

ust specify the IP in --host option like ng serve --host 192.16.1.1

Now you can visit http://192.16.1.1:4200 in your browser and it will work

下面是一个例子:

ng serve --host 192.168.1.102 --port 4201

.

原文地址:https://www.cnblogs.com/freeliver54/p/9660569.html