FirebaseExtended / angularfire

AngularJS bindings for Firebase

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Firestore is loading all data in every new insert or any updates

vyapariapp opened this issue · comments

this.unsubscribe= this.firestore.collection('mycollection').ref.where("somecase","==","myvalue")

  .onSnapshot((data=>{}));

I need to make my website live data but when i using above code firestore loading all data for each and every update/insert and it is very costly .
I only need to load newly added data or updated data not all data each and every time.
How to do it in angular6?

This code is in admin website and this is view order page collection is orders And from user app users will make order and the orders will inserts in collection order And what we need is when user make an order we need to view order without refreshing admin page. But now it showing new orders without refreshing but the problem is it is loading all documents inside onSnapshot method when users make an order .we only need to fetching new orders only