angular - Merging multiple FirebaseListObservables with proper sorting -


i writing firebase-based chat web application support feeds multiple rooms. have combinelatest working (adapted this example:)

let rooms = ['room1', 'room2', 'room3']; let observables = rooms.map((room) => { return this.cs.getmessagesbyroomid(room) });  this.messages = observable.combinelatest(   observables,   (...rooms) => {     console.log('rooms',array.prototype.concat(...rooms));     return array.prototype.concat(...rooms)   } ); 

but not sort posts correctly... merge should automatically, hope there's way working.


Comments

Popular posts from this blog

python - Operations inside variables -

Generic Map Parameter java -

arrays - What causes a java.lang.ArrayIndexOutOfBoundsException and how do I prevent it? -