Open deepthan opened 3 years ago
使用ipconfig查看自己的ipV4地址,如192.168.16.11,之后在加上--host 192.168.16.11 ,关闭本地防火墙别人即可访问你的项目。
192.168.16.11
--host 192.168.16.11
也可以直接使用--host 0.0.0.0启动。 访问地址 192.168.16.11:4200
--host 0.0.0.0
192.168.16.11:4200
启动方式 ng server --host 192.168.16.11
ng server --host 192.168.16.11
ng serve --host 192.168.16.11
serve
1. 如何让别人可以访问自己本地启动的服务
使用ipconfig查看自己的ipV4地址,如
192.168.16.11
,之后在加上--host 192.168.16.11
,关闭本地防火墙别人即可访问你的项目。也可以直接使用
--host 0.0.0.0
启动。 访问地址192.168.16.11:4200
启动方式
ng server --host 192.168.16.11