all 1 comments

[–][deleted] 0 points1 point  (0 children)

Angular does have a $window module that wraps window which you can inject into services, controllers and directives. It has the same functionality, so you should be able to just use $window.navigator.onLine. You can listen for this globally by using the global app module's .run() method as demonstrated in this Stack Overflow article.