I have problems with a chat that I am doing with angular 5 and firebase, I show the messages with the ngFor sends them to me randomly.
<div class="alert alert-{{item.color}} mt-2" role="alert" *ngFor="let item of items">
{{item.user}} dice: {{item.name}}
chat link: https://tareas-dab28.firebaseapp.com/
The order depends on how you have "filled" the array, which completely depends on the order in obtaining specified in your data source by some element such as some date or key value, as you say Firebase is, for RealTimeDb the reference is here: https://firebase.google.com/docs/database/web/lists-of-data (How to sort and filter data)
or for FireStore here: ( https://firebase.google.com/docs/firestore/query-data/order-limit-data )