I'm trying to implement sort function to my table in angular, and all my data from my rest api does show up in the table. But the problem I get is when I click on arrow my data in table doesn't sort. My data comes from a method in other ts file witch get the data from rest api
What I have tried is followed this links but it doesn't work
Angular Material Table Sorting - Data Doesn't sort when inside a *ngIf condition
Sorting Not Working Angular Material Design Table
https://material.angular.io/components/table/overview#sorting
I have some problem to upload code
This is my controller code, the method to get code from rest api: https://imgur.com/a/qX2AcNJ
This is my code who should take a data from controller and show in html: https://i.stack.imgur.com/DVTBB.jpg
This is the html file: https://imgur.com/a/q4FJmuK