Can't add any ngCordova plugin


#1

Hi

I have started a new Ionic application and after that I needed to add the geolocation plugin and I have placed the parameter in the controller function ($cordovaGeolocation) and I keep getting the following error: Error: [$injector:unpr] Unknown provider: $cordovaDeviceProvider <- $cordovaGeolocation <- DashCtrl .
I have tried to install other plugins, but I get the same error.


#2

do you install them through cordova cli?


#3

No, I’ve installed them using ionic.


#4

The plugins appear in outside the ‘www’ folder in the ‘plugins’ folder, but when I try to call them in my application I get that error.
Is this error caused by the change of the cordova plugin installation, from org.apache.cordova.[pluginName] to cordova-plugin-[pluginName]. I have installed the plugin using both URLS and I get the same error


#5

I install plugins like writes in ngCordova docs: “cordova plugin add XXX”, - then add $cordovaXXX to controller function and all works like a magic


#6

Was a problem with my node version, I had the latest version and had some errors with cordova. But now it seems that on iOS 8.3 the geolocation plugin doesn’t work at all, even on an older application that is AppStore.


#7

Did you follow these steps: http://ngcordova.com/docs/install/?