Using AngularJS, how can I display the status of the warning message if I lose the Internet connection in my application?
I am working on the Angularjs Express platform and API. while working on the application, if I lose my Internet connection, I need to issue a warning and I must stop causing HTTP requests until I get a proper Internet connection and resume work.
I even tried with offline.js could not solve, please, if some simple and easy way, let me know thanks. In the header, I added all of these
<script src="/javascripts/plugins/offlinechecking/offline.min.js"></script>
<link rel="stylesheet" href="/stylesheets/themes/offline-theme-chrome.css" />
<link rel="stylesheet" href="/stylesheets/themes/offline-language-english.css" />
<script>
Offline.options = {
checkOnLoad: false,
interceptRequests: true,
reconnect: {
initialDelay: 3,
delay: (1.5 * last delay, capped at 1 hour)
},
requests: true,
game: false
</script>
source
share