adriancarriger / angularfire2-offline

🔌 A simple wrapper for AngularFire2 to read and write to Firebase while offline, even after a complete refresh.
https://angularfire2-offline.firebaseapp.com/
MIT License
207 stars 48 forks source link

How to know whether particular record is in local or updated in firebase? #83

Open nshiva opened 6 years ago

nshiva commented 6 years ago

I am using angularfire2-offline in my application. I am storing array of students objects. some thing similar to

students: AfoListObservable<any[]>;
students = afoDatabase.list('/students');

On the UI, <button ion-item *ngFor="let patient of studnets | async" >{{student.name}} - {{student.age}}</button> I would like to display some icon on this button based on whether particular student object is updated in firebase or not?

Could you help me in implementing this?

vixson commented 5 years ago

if there is a change on that student node the observable would fire-up asynchronously and both the GUI and the local-storage would be updated on that change.