Capture firebase data with angularfire2

0

I try to make an application that has an internal chat where users can send messages to each other and I have the following model

The question is, how do I manage to capture the rooms where I have the ids of the registered chats in which I have or have sent me a message?

The idea is to have a list of the chats with the following format

    
asked by Sergio Guerrero 28.02.2018 в 06:29
source

1 answer

0

I managed to solve the problem by following the guides of the angular library for firebase

link

what I derive in a simple instruction

private db: AngularFireDatabase

this.db.list("/chats/rooms/" + room, ref => ref.orderByChild(fromorto).equalTo(userId).limitToFirst(1)).valueChanges();
    
answered by 28.02.2018 в 21:47