<ion-content>
<ion-list>
<ion-list-header>Follow us on Twitter</ion-list-header>
<ion-item *ngFor="let item of contactsfound">
{{ item.displayName }}
<p>{{ item.phoneNumbers }}</p>
</ion-item>
</ion-list>
</ion-content>
I am getting the list of displayName correctly however for phoneNumbers i get [object Object]
How to do this??
Also, I want to have a letter on the left-side of the list where is represents the first letter of a group of contacts starting with that letter (e.g. A list group then scrolling B list group) … it would be great if someone provides an insight regarding this. thanx
what you are doing is correct… besides I don’t see your html side… also it presents error if you are running with ionic serve , you should run on phone ionic run android --prod --device
follow this to learn how to debug using dev tools with your phone connected (to retrieve contact data) and then you can log and see how the retrieved array looks like and how to access it properly
I also posted a question , and provided answer too but in a little different way… I took what I needed from contacts (name and number) and stored in new array (for saving them in storage so not everytime it keeps loading, and just get it from storage when the user navigates again to contacts) but you have to also take care of when there is a number added/removed from the contacts , and how your app should update that piece of info (or keep loading everytime, its up to you)
Hello there i m so sory to distubing you but Maybe u can help me on an other issu .I m using Nadroid studio to run app on android but android studio makes my comp so slow and it takes time .However when i use CLİ with ionc run android it gives this error
BUILD SUCCESSFUL
Total time: 55.886 secs
Built the following apk(s):
C:/Users/home/TopluMesaj/platforms/android/build/outputs/apk/android-debug.apk
ANDROID_HOME=C:\Users\home\Documents
JAVA_HOME=C:\Program Files\java\jdk1.8.0_121
Error: cmd: Command failed with exit code 1 Error output:
‘adb’ is not recognized as an internal or external command,
operable program or batch file.
How can i fix this problem can u suggest any link to find a proper solution.
Thank you again i hope i dont make you busy so much