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
以上就是本文的全部內容,希望本文的內容對大家的學習或者工作能帶來一定的幫助,同時也希望多多支持腳本之家!
相關文章
詳解Angular系列之變化檢測(Change Detection)
這篇文章主要介紹了詳解Angular系列之變化檢測(Change Detection),小編覺得挺不錯的,現(xiàn)在分享給大家,也給大家做個參考。一起跟隨小編過來看看吧2018-02-02
深究AngularJS如何獲取input的焦點(自定義指令)
本篇文章主要介紹了AngularJS如何獲取input的焦點(自定義指令),具有一定的參考價值,感興趣的小伙伴們可以參考一下2017-06-06
解決angularjs WdatePicker ng-model的問題
今天小編就為大家分享一篇解決angularjs WdatePicker ng-model的問題,具有很好的參考價值,希望對大家有所幫助。一起跟隨小編過來看看吧2018-09-09

