$cordovaNetwork is not working in ios #ngCordova


#1

$cordovaNetwork is not working. When I did “alert(JSON.stringify($cordovaNetwork));”, It is returning “{}” in ios. Not tested in android.

UPDATE: I have found Typo error in ng-cordova.js:

ORIGINAL CODE: (Typo error in “return networkSate”, should be ‘networkState’ instead)
isOffline: function () {
var networkState = navigator.connection.type;
return networkSate === Connection.UNKNOWN || networkState === Connection.NONE;
}


#2

well its corrected in the master:

i was curious because I have en issue with $cordovaNetwork on android (long story: https://github.com/driftyco/ng-cordova/issues/60)

//

pelle