I know from this question and answer on Super User Site running on localhost on desktop is unreachable on android device (PS: this question continues on the question in the link) that the command ng serve
opens a bad configured webserver.
The question is how could I run my site on an Android device without deploying my site. I'll try to run the site on this url http://192.168.0.168:4200
using Angular-CLI.
try ng serve --host
option as explained in this issue: https://github.com/angular/angular-cli/issues/1793 comment by intellix.
ng serve --host 0.0.0.0
<local IP adress>:4200
from any device on the same network.NOTE: If you get CONNECTION_REFUSED just disable your firewall and you should be good to go.
otherwise, try https://ngrok.com/ to open a tunnel from your local network to your computer's localhost. Basically your computer forwards the 4200 port to an external IP and port that any device on the network can access.