About

Connect to the ng serve using IP instead of localhost in Angular

Apr 20th, 2023

1 min read

Sometimes you want to check UI on different devices or debug your code when you implement. This approach can help you easy to debug.

  1. Open terminal and run ifconfig (ipconfig on Windows system) to get your IP address. (Ex. 192.168.1.x)
  2. In Angular project run ng serve --host 0.0.0.0
  3. Open browser and use url 192.168.1.x:4200


Related Posts