Skip to content
This repository has been archived by the owner on Sep 15, 2021. It is now read-only.

$cordovaNetwork not working #1389

Open
Mdhaker opened this issue Dec 7, 2016 · 3 comments
Open

$cordovaNetwork not working #1389

Mdhaker opened this issue Dec 7, 2016 · 3 comments

Comments

@Mdhaker
Copy link

Mdhaker commented Dec 7, 2016

I'v been through many issues and discussions, and still not able to fix it,

Calling $cordovaNetwork.getNetwork() or any function within the $cordovaNetwork gives Cannot read property 'type' of undefined

when I console.log the $cordovaNetwork.getNetwork without parenthesis () it prints the function code, that means it exist but when i add the () it give that error.

its not only in my project, even i tried other project from github that should be working it gives that error..

this is the code within the controller :

.controller('SignInCtrl',function($state,$scope,$cordovaOauth, $localStorage, $location,$cordovaNetwork){ console.log('wokring fine Side menu'); console.log($cordovaNetwork.getNetwork());

the network information plugin installed with this version

cordova-plugin-network-information 1.3.0 "Network Information

@klodha
Copy link

klodha commented Dec 15, 2016

Facing same issue. Found many issues reported with same $cordovaNetwork: TypeError: Cannot read property 'type', but no one has a solution. Saw couple of issues simply closed with a remark asking share a sample project.

@Mdhaker
Copy link
Author

Mdhaker commented Dec 21, 2016

@klodha did you find a way to fix it ?

@Mdhaker
Copy link
Author

Mdhaker commented Dec 21, 2016

Is seems to be working fine on device :) most of ngCorodva plugins works just on Deivces

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants