Cordova Device Motion

Hi Guys,

Im trying to implement this Device motion( http://ngcordova.com/docs/plugins/deviceMotion/ ) but this error happens

Controller:

.controller('ShakeAccelerationCtrl', function($scope, ngFB, **$cordovaDeviceMotion**) { ..});

Error:

Error: [$injector:unpr] Unknown provider: $cordovaDeviceMotionProvider <- $cordovaDeviceMotion <- ShakeAccelerationCtrl

Someone know whats happening? I already installed this plugin but $cordovaDeviceMotion is not be found.

Thanks

Have you checked in console that your app loaded these 2 files: Acceleration.js and accelerometer.js?
Installation cuold have failed to copy them.

Hi gmarziou,

Thanks for your response.

I install using cordova command cordova plugin add cordova-plugin-device-motion and it says is already installed…

I check on tree files and i can see on plugin dir cordova-plugin-device-motion. Should I modify some file to activate this plugin??

Thanks…

Raf

Oh I got it…

I forgot to instal ngCordova… Dumb mistake.

Thanks so much to your help.
Raf

Do we need to install ngCordova in ionic 2… cox I am able to use other native plugins but not able to use device motion or shake