Skip to content

Instantly share code, notes, and snippets.

@ShuvoHabib
Created June 7, 2017 05:23
Show Gist options
  • Save ShuvoHabib/756c6099d72b4d996656fc1433c12c56 to your computer and use it in GitHub Desktop.
Save ShuvoHabib/756c6099d72b4d996656fc1433c12c56 to your computer and use it in GitHub Desktop.
Promise base API Call
getGroupChatDetails() {
this.conversations[this.id].members.map(id => {
const promise = this.fetchProfile(id);
promise.then((result) => {
//this.profileDetails.push(result.payload.data.data.profile);
this.profileDetails = result.payload.data.data.profile;
}, (err) => {
console.log(err);
});
});
},
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment