Using AngularJS, how can I display an alert message status if I lose an internet connection in my app?
I am working on Angularjs Express framework and APIs. while working on app if I lose internet connection I need to pop up an alert and I should stop calling HTTP requests until I receive a proper internet connection and resume the work.
I even tried with offline.js am not able to solve please if any simple and easy method is there let me know thank you. In header I added all 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>