I am working on a new project on Angular 6.
I have a list of students with a *NgFor :
(html)
<tr *ngFor="let kk of Repdata | filterdata: queryString : 'name' ; let ind = index">
    <td>{{ind + 1}}</td>
    <td>{{kk.name}}</td>
    <td>{{kk.prenom}}</td>
(filterdata is use for a seachbar)
typescript :
GetUser(){
   return this.http.get('http://localhost:8080/api/getUser/')
           .map((response: Response) => response.json())
}
javascript :
app.get("/api/getUser",function(req,res){
    model.find({},function(err,data){
              if(err){
                  res.send(err);
              }
              else{
                  res.send(data);
                  }
          });
  })
In my table, I have my data ordered by id, but I want to order it by name. I don't know how to.
 
     
     
    