Problem get Contact list - TypeError: Cannot read property 'find' of undefined

Hi,

i am try to do a sample app to read contacts list from phone.
But when i call the method:$cordovaContacts.find(
i get this error:
TypeError: Cannot read property ‘find’ of undefined

Looks lihke the problem is on $cordovaContacts, but i have

app.controller(‘ContactsController’, function($scope, $cordovaContacts, $ionicPlatform) {

and i have too:


I dont know the reason, can anybody help me?

Thanks

I have the script:

js/ng-cordova.js

Hey,

I got the same thing on my local ionic serve env as cordova contacts plugin is available on the device only.

Therefore I have developed a simple service who mocks the plugin in local dev environments:

Maybe it can help…

Meir.