I am using ionic framework( Angular Fire Database) to build a simple chat
application. I have two paths chat/users/ and chat/messages. The first path
chat/users/ contains list of registered users with these columns: id,
username. The second path chat/messages contains list of chat messages sent
by the user, it has these column details : id, messages
Below shows the path column
/chat/users/
id
username
/chat/messages/
id
messages
Now I am retrieving list of messages from the /chat/messages/ and its
corresponding users from the /chat/users/, the problem is how to query data
using the id from chat/messages/ to find the users from the chat/users/
path.
Below is my variable and constructor
...
dans: FirebaseListObservable<any[]>;
constructor(af:AngularFireDatabase) {
this.dans =af.list('/chats/messages/');
}
...
The above snippet is able to retrieve a list of messages from the database.
However I cant seem to find a way to join the second path, /chat/users/ to
get users, as it is seem in using join queries in SQL.
I would be so much glad if somebody could help. Thanks
--
You received this message because you are subscribed to the Google Groups
"Angular and AngularJS discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.