private isAscendingSort: boolean = false;
sortUser() {
console.log('sorting!'); // just to check if sorting is being called
this.isAscendingSort = !this.isAscendingSort; // you missed this
this.items.sort((item1: any, item2: any) => this.compare(item1, item2));
}