I have this list of messages objects, with a message, a user_id and a date. I actually want to retrieve user informations together with each message.
return new Promise<any>((resolve, reject) => {
this.afs.collection('/messages").snapshotChanges()
.subscribe(snapshots => {
resolve(snapshots)
})
})
I don't think iterating on the messages to get users is what I want to do - there should be a much better way. I'm also not sure about the recommandations I read at some places about storing the whole user data for each location where you could need it... I don't like it.
Is there a better way ?