|
@@ -18,11 +18,9 @@ export class ContactListPage implements OnInit {
|
|
|
const Contact = Parse.Object.extend('Contact');
|
|
|
const query = new Parse.Query(Contact);
|
|
|
query.ascending('firstChar');
|
|
|
-
|
|
|
if (this.searchName) {
|
|
|
query.contains('name', this.searchName);
|
|
|
}
|
|
|
-
|
|
|
query.find().then((results) => {
|
|
|
this.contactList = results;
|
|
|
this.contactList.forEach((contact,index)=>{
|
|
@@ -34,7 +32,6 @@ export class ContactListPage implements OnInit {
|
|
|
console.error('Error while fetching contacts', error);
|
|
|
});
|
|
|
}
|
|
|
-
|
|
|
search() {
|
|
|
this.loadContact();
|
|
|
}
|