Working on an Angular5 app using angularfire2. I have a List with a big number of items. When I subscribe to it using:
this.db.list("/list").valueChanges().subscribe(data => { .. });
I get all children of the list in data as expected. When I now change one single item in the Firebase backend, the callback then receives the entire list of all children again.
How can I subscribe to only receive the affected items of a list in data?
Or is it irrelevant because angularfire2 handels the state of the list internally and only transfers the affected items from the server to the app? My target is to minimize connection traffic.
Thanks in advance :)
AngularFire2 valueChanges()
always gives you the entire list. If you want just the state changes, use stateChanges
.
There are use-case for any of the observable types in AngularFire. Check the documentation to see which one matches your use-case best.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With