skip to Main Content

Javascript – how to display dynamic data as selected in ng-select with search dropdown?

let options= [{value: 'a', id:1},{value:'b',id:2}]; let items=[]; i will be binding this data to ng select with search in ng-options <ng-select [items]="options" bindLabel="value" bindValue="value" [multiple]="true" placeholder="Search for..." [(ngModel)]="items" (change)="changeFn($event,false)" [hideSelected]="true" > <ng-template ng-option-tmp let-item="item" let-item$="item$" let-index="index" > <div class="row"> <span…

VIEW QUESTION

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