skip to Main Content

Html – array.reverse() in my *ngFor don't work in production

I don't know why, when I interact with my textarea, my _messagesList is reverse ASC and DESC everytime. <div class="chat__messages"> <div *ngFor="let message of authService._messagesList.reverse()" [@fadeInOut] class="message" [ngClass]="session.User.id == message.Id_Sender ? 'myMsg' : 'otherMsg'"> <p>{{message.Content}}</p> <span>{{message.createdAt | date: "HH:mm"}}</span> </div>…

VIEW QUESTION
Back To Top
Search