07-31-2023, 09:59 AM
When I initialize a FirebaseListObservable list then subscribe to it, if I have 3 items in the list, the subscribe method will get called 0 items, then 1, then 2, then with all 3 items. So the code below:
let subscription = this.af.database.list('/items')
.subscribe(x => console.log('x', x));
Will log to the console:
x []
x [ Object ]
x [ Object, Object ]
x [ Object, Object, Object ]
Is there a way to skip right to all 3 items rather than this progressive increment?
let subscription = this.af.database.list('/items')
.subscribe(x => console.log('x', x));
Will log to the console:
x []
x [ Object ]
x [ Object, Object ]
x [ Object, Object, Object ]
Is there a way to skip right to all 3 items rather than this progressive increment?