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

sql - Time in datatime field -

javascript - How to split the success output from an Ajax post? -

java - sharing object across different classes -