i have used the cordova Contacts plugin to get the contact list in the application.
i have put the search bar on top to search within the list.
Typescript**
Method to initialize the pluging
getContactList(){
let options = {
multiple: true,
hasPhoneNumber: true,
contactFields: ['displayName']
}
Contacts.find(['*'], options).then((contact) => {
this.contactarray = contact;
console.log(this.contactarray); // This shows the complete object.
console.log(this.contactarray.displayName); // it says undefined :( IDK why....
}, (err) => {})
}
HTML*
{{contact.displayName}}Here i got the displayName property of the contact object and is displays the contact names perfectly, but i am not able to get displayName property in TS file.
Requirement**
i need the displayName property in the TS file to let the searchbar works properly…
Thanks