How to view localhost Angular web application in your mobile device ?

--

Welcome guys today we are learning about how can we view localhost angular web app in our mobile device…

We know that some time we have to test web application in mobile device as well to check responsiveness. But problem is that how can we locally access. Don’t worry I will tell you how to config web application for your mobile view….

Step -1 Find your local IP Address…

Step -2 Run you angular application

Just follow this command to run the application

ng serve --host <your-local-ip>

Step -3 Now enter this IP with port in browser of mobile device…

Enter IP like this in your device’s browser… Here we use 4200 because its default port where the angular app runs. You can set your own during run the app..

  192.168.1.49:4200

Hurrah… 🙃

You should now be viewing your app on your mobile device. It will reload every time when your localhost reloads, so it will be perfectly sync with your locally served desktop application.

That’s it for today. We will meet soon…. Stay connected… 🙂

--

--

Rajveer Choudhary
Rajveer Choudhary

Written by Rajveer Choudhary

Full Stack Engineer | Tech Blogger | Mean Stack Developer

No responses yet