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


#1

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


#2

I have the script:

js/ng-cordova.js


#3

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.