How to allow access outside localhost in Angular?
Answers (1)
Add AnswerYou can use the following command to access with your ip.
ng serve --host 0.0.0.0 --disable-host-check
If you are using npm and want to avoid running the command every time, we can add the following line to the package.json file in the scripts section.
"scripts": { ... "start": "ng serve --host 0.0.0.0 --disable-host-check" }
Then you can run you app using the below command to be accessed from the other system in the same network.
npm start