This repository was archived by the owner on Sep 15, 2021. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -9,14 +9,14 @@ angular.module('ngCordova.plugins.network', [])
9
9
var offlineEvent = function ( ) {
10
10
var networkState = navigator . connection . type ;
11
11
$rootScope . $apply ( function ( ) {
12
- $rootScope . $broadcast ( 'networkOffline ' , networkState ) ;
12
+ $rootScope . $broadcast ( '$cordovaNetwork:offline ' , networkState ) ;
13
13
} ) ;
14
14
} ;
15
15
16
16
var onlineEvent = function ( ) {
17
17
var networkState = navigator . connection . type ;
18
18
$rootScope . $apply ( function ( ) {
19
- $rootScope . $broadcast ( 'networkOnline ' , networkState ) ;
19
+ $rootScope . $broadcast ( '$cordovaNetwork:online ' , networkState ) ;
20
20
} ) ;
21
21
} ;
22
22
@@ -40,12 +40,12 @@ angular.module('ngCordova.plugins.network', [])
40
40
41
41
clearOfflineWatch : function ( ) {
42
42
document . removeEventListener ( "offline" , offlineEvent ) ;
43
- $rootScope . $$listeners [ "networkOffline " ] = [ ] ;
43
+ $rootScope . $$listeners [ "$cordovaNetwork:offline " ] = [ ] ;
44
44
} ,
45
45
46
46
clearOnlineWatch : function ( ) {
47
47
document . removeEventListener ( "online" , offlineEvent ) ;
48
- $rootScope . $$listeners [ "networkOnline " ] = [ ] ;
48
+ $rootScope . $$listeners [ "$cordovaNetwork:online " ] = [ ] ;
49
49
}
50
50
} ;
51
51
} ] ) ;
You can’t perform that action at this time.
0 commit comments