-1

I'm trying to access my angular 10 app from other machine. I have tried the below options but nothing worked.

ng serve --host 0.0.0.0 --disableHostCheck true
ng serve --open --host 0.0.0.0 --disable-host-check
ng serve --host 192.168.x.x

I have looked at similar questions and tried all the solutions but nothing worked for me. I tried enabling Node.js to communicate through Windows Defender Firewall.

enter image description here

I have created a brand new angular 10 app and tried running it locally and accessing it from a different machine but that didn't work as well. I'm suspecting there is something wrong with my windows proxy settings and I have tried all of this in my office network. Please help!

Vinda
  • 213
  • 3
  • 7
  • 24
  • `ng serve --host 0.0.0.0` is the correct command. If other Pc's in your LAN aren't reaching 'you' it's not a Angular's error rather could be some LAN policies, firewalls, and so on. – Jacopo Sciampi Jan 26 '21 at 05:54
  • my co-workers are able to run the same angular app and I'm able to access their locally running app but if I run it locally they are not able to access it. Can you please suggest what might be wrong with my windows network settings – Vinda Jan 26 '21 at 07:13

1 Answers1

0

I think you need to connect the two computers on the same network, and then identify the ip address of your machine on which the angular application is to start and when starting the application use the following command

ng serve --host your-local-ip-address

and to access it from the other computer your-local-ip-address: port-number

exmple: 192.168.1.114:4200
desertnaut
  • 57,590
  • 26
  • 140
  • 166
zetsu010
  • 74
  • 7