My project work with API. I want to check internet when is disconnection and don't connection webservice. In this moment I want to display alarm in web. Can you suggest me some idea, your experience please? Thnx
Asked
Active
Viewed 1,214 times
1
-
If you are disconnected you cannot connect to the webservice. So when your connection to the webservice fails you know you have no connection. Some code of how you connect to the webservice would be useful. – KIKO Software Jan 30 '18 at 09:24
-
You could ping a random site. If you get a response then you're online, else you're not. Search for 'angular4 ping' there's several sources you can use. – rrd Jan 30 '18 at 09:24
-
1i thing this question is dublicate [link](https://stackoverflow.com/questions/46598777/check-internet-connection-in-web-using-angular-4) – Mohammad Javad Noori Jan 30 '18 at 09:24
-
check my answer here: https://stackoverflow.com/a/51670162/842386 – vinesh Aug 03 '18 at 10:09