Closed rommsen closed 12 years ago
implemented via
.run(function ($rootScope, $window) {
$window.addEventListener("online", function () {
$rootScope.$broadcast('onlineChanged', true);
}, true);
$window.addEventListener("offline", function () {
$rootScope.$broadcast('onlineChanged', false);
}, true);
});
and
$scope.$on('onlineChanged', function (evt, isOnline) {
siehe: https://groups.google.com/forum/?fromgroups#!topic/angular/ZncvSVUc9y4 und http://jsfiddle.net/rommsen/QY8w2/