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

前端 未结 5 1898
轮回少年
轮回少年 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:21

    Following the advice on this page: https://medium.com/webpack/webpack-dev-server-middleware-security-issues-1489d950874a, this worked for me:

    ng serve --host 0.0.0.0 --host my-computer

提交回复
热议问题