angular-cli修改端口号【angular2】
更新时间:2017年04月19日 09:39:46 作者:Mr_Sparta
本篇文章主要介绍了angular2中angular-cli修改端口号的相关知识。具有很好的参考价值。下面跟着小编一起来看下吧
找到node_modules/angular-cli/lib/config/schema.json
default值就是默认的端口
"serve": {
"description": "Properties to be passed to the serve command",
"type": "object",
"properties": {
"port": {
"description": "The port the application will be served on",
"type": "number",
"default": 4200
},
"host": {
"description": "The host the application will be served on",
"type": "string",
"default": "localhost"
}
}
}
}
也可以通过命令行方式修改,如:
ng serve --port 4201
以上就是本文的全部内容,希望本文的内容对大家的学习或者工作能带来一定的帮助,同时也希望多多支持脚本之家!
相关文章
AngularJS实现的鼠标拖动画矩形框示例【可兼容IE8】
这篇文章主要介绍了AngularJS实现的鼠标拖动画矩形框,涉及基于AngularJS的事件响应及页面元素属性动态操作相关实现技巧,需要的朋友可以参考下2019-05-05
解决ng-repeat产生的ng-model中取不到值的问题
今天小编就为大家分享一篇解决ng-repeat产生的ng-model中取不到值的问题,具有很好的参考价值,希望对大家有所帮助。一起跟随小编过来看看吧2018-10-10


最新评论