Quantcast
Channel: Ionic Forum - Latest posts
Viewing all articles
Browse latest Browse all 229353

I can't fetching contacts of names and phone in ionic3

$
0
0

in file HTML

                        <div class="container" *ngFor="let contact of contactlist">
                            <h2 class="name">{{contact.displayName}}</h2> 
                            <p class="number">{{ contact.phoneNumbers }}</p>
                        </div>
                       
               

in file TS


import { IonicPage, NavController } from 'ionic-angular'; 
import { Contacts, Contact, ContactField, ContactName } from '@ionic-native/contacts';   
@IonicPage()
@Component({
  selector: 'page-add-chat',
  templateUrl: 'add-chat.html',
  providers: [Contacts]}
)
export class AddChatPage {  
  private contactlist: any[];   
   constructor(public navCtrl: NavController, 
     private contacts: Contacts   ) {
 
      this.contacts.find(["displayName", "phoneNumbers"], {multiple: true}).then((contacts) => {
        this.contactlist = contacts;
      });
         
} 

Viewing all articles
Browse latest Browse all 229353

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>