How to test an app created with Angular CLI ng serve from another device?

前端 未结 5 1909
轮回少年
轮回少年 2021-02-02 07:37

I have an app generated with Angular CLI from scratch. CLI version angular-cli: 1.0.0-beta.11-webpack.2

I am trying to test it from my smartphone but I get

5条回答
  •  悲哀的现实
    2021-02-02 08:15

    In package.json

     "start": "ng serve --host 0.0.0.0   --port 4200 --disable-host-check ",
    

    However --disable-host-check would be a security risk and you will need "@angular/cli": "^1.1.0-rc.2" as this flag appeared in 1.1 version

提交回复
热议问题