angular-cli修改端口号【angular2】
- 作者: 老中医砖治吹牛逼
- 来源: 51数据库
- 2021-08-08
找到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
以上就是本文的全部内容,希望本文的内容对大家的学习或者工作能带来一定的帮助,同时也希望多多支持!
推荐阅读
热点文章
Angular中响应式表单的三种更新值方法详析
7
Angularjs实现下拉框联动的示例代码
7
详解AngularJS跨页面传值(ui-router)
2
详解AngularJS1.x学习directive 中‘& ’‘=’ ‘@’符号的区别使用
3
angular2路由切换改变页面title的示例代码
4
Angular2 组件间通过@Input @Output通讯示例
5
Angularjs中ng-repeat的简单实例
3
AngularJS 中ui-view传参的实例详解
4
浅谈Angular路由守卫
4
详解基于Angular4+ server render(服务端渲染)开发教程
4
