I'm trying to sort my array by group and then identifier fields, which works fine, until one of the strings contains a special character, for example Á or Ű.
Is there any kind of typescript or ng-2 specific method or sth to solve my problem?
Example sorting method:
private someSortingMethod(): void {
this.sortable= this.sortable.sort((t1: SomeThing, t2: SomeThing): number => {
if (t1.group < t2.group) return -1;
if (t1.group > t2.group) return 1;
if (t1.identifier < t2.identifier) return -1;
if (t1.identifier > t2.identifier) return 1;
return 0;
});
}
Thank you.