我需要在呈现之前按Name
按升序对列表进行排序。
伙计们,如果你知道如何从数据库中排序(MS sql server 2012)请告诉我
employe.component.html:
<tr *ngFor="let employee of employeeService.employeeList">
<td>{{employee.Name}}</td>
<td>{{employee.DOB}}</td>
<td>{{employee.Salary}}</td>
<td>
<a class="btn" (click)="showForEdit(employee)">
<i class="fa fa-pencil-square-o"></i>
</a>
<a class="btn text-danger" (click)="onDelete(employee.EmployeeId)">
<i class="fa fa-trash-o"></i>
</a>
</td>
</tr>