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

ubuntu - PHP script to find files of certain extensions in a directory, returns populated array when run in browser, but empty array when run from terminal -

php - How can i create a user dashboard -

javascript - How to detect toggling of the fullscreen-toolbar in jQuery Mobile? -