Angular2 默认配置端口4200的更改方法

法一:需要对应包路径下的配置,收到修改

1、定位到:..\node_modules\._@angular_cli@1.0.1@@angular\cli\lib\config

2、打开schema.json

3、直接看图,修改即可。

技术分享

 

法二:通过cmd命令进行

        cmd定位到项目目录,命令:ng serve --port 端口号

        如:ng serve --port 4201

文章来自:http://www.cnblogs.com/Johnchen1/p/7119443.html
© 2021 jiaocheng.bubufx.com  联系我们
ICP备案:鲁ICP备09046678号-3