I am not able to sort the column in Mat Table with mat sort having numbers displayed . The numbers returning from the api are comma separated at hundreds , thousands places and so on.
Html
<ng-container matColumnDef="amount">
<th mat-header-cell *matHeaderCellDef mat-sort-header> Amount </th>
<td mat-cell *matCellDef="let element"> {{element.amount}} </td>
<td mat-footer-cell *matFooterCellDef> </td>
</ng-container>
.Ts
displayedColumns: string[] = ['amount', 'name'];
@ViewChild(MatSort) sort: MatSort;
ngOnInit(){
this.dataSource.sort = this.sort;
}
ngAfterViewInit(){
this.dataSource.sort = this.sort;
};