How to update your app with latest data from database?

I am creating an Ionic / Angular app that stores conversation between users in a firebase database.

Currently, I am able to create conversations & update them.

When I go to the Conversation page, all messages are being displayed.

Now I am looking to “live update” conversations.

For example, if User A is looking at a conversation they are having with User B, and User B updates that conversation.

How can I update User A’s phone so that they see the latest message?

Like if you are on WhatsApp and someone sends you a message while you are looking at he chat.

Thanks a lot!

Are you working with angularfire?

You need to work with subscriptions. AngularFire2 makes it really easy.

You can use firebase real time database.
Here is a good article on how to build a real time chat app.

Hope it helps.