Ionic native contacts could not find 'find'


#1

Hi,

i tried to get contacts from phone book but Contact plugin could not find method ‘find’


#2

Look at the usage example of Ionic Native Contacts:
https://ionicframework.com/docs/native/contacts/
You are using wrong code.


#3

You have to inject the plugin in your Component by passing it in the constructor as a parameter, like this:

constructor(private contacts: Contacts) {

}

Then you can call the find method, like this:

this.contacts.find(['*'])

For more information on the usage visit:
https://ionicframework.com/docs/native/contacts/