2

I have a confusion regarding Firebase observable in angular, here is structure

enter image description here

I want to watch all chats of particular user who logged in to my app, and I am seeing two option for achieve this.

  1. Watch /chats node which means logged user will get notification for all users chats and I have to filter out logged user chats.

  2. Watch multiple node like /chats/chatId , /chats/chatId .... so on, In this logged user will not get notification for all users chats, It will only get their own chats notification.

So which one will be good or if something better than this Please let me know.

droidBomb
  • 850
  • 5
  • 8
Nishant Dixit
  • 5,388
  • 5
  • 17
  • 29

0 Answers0