@longliveajay wrote:
For some reason my application fails to read contacts from user's phone:
get(){
Contacts.find(['*']).then((lists) => {
this.contacts = lists;let contentHeader: Headers = new Headers({"Content-Type": "application/json"}); let url = `http://localhost:8080/api/contacts`; return this._http.post(url, lists, {'headers': contentHeader}); });
}
The template
<button type="button" (click)="get()">Contacts</button> <ion-list> <ion-item *ngFor="let contact of contacts">{{contact.displayName}}</ion-item> </ion-list>
I can't understand why it fails to read contacts. Any help ?
Posts: 1
Participants: 1