Cannot read property 'vibrate' of undefined


#1

Now i’m using ng-cordova vibrate plugin using ionic but it’s not working for me. it shows the error Cannot read property 'vibrate' of undefined in console log. Could you tell me how to use the plugin? please try to find out the good solution for me. thanku.

I followed source link:

http://ngcordova.com/docs/plugins/vibration/


#2

Are you sure that you are executing the code on your physical device? The object $cordovaVibration will be undefined as soon you are in a browser environment.


#3

@mcmion120 No, I’m not execute in device… but my browser console shows cannot read property ‘vibrate’.


#4

@mcmion120 In physical device also not working my friend.