У меня есть данные JSON из API, отображаемые в таблице, и я хочу выполнить сортировку для заголовка таблицы,
Я пытался использовать ngx-order-pipe , но я сталкиваюсь с этой ошибкой:
TypeError: expression.indexOf не является функцией
, это мой шаблон
<table class="table table-striped table-hover table-bordered table-fixed-header">
<thead>
<tr>
<th>#</th>
<th>الاسم</th>
<th>الهاتف</th>
<th>العنوان</th>
<th>الحساب</th>
<th>ملاحظات</th>
<th>إجراءات
<button class="btn btn-success">
<i class="fa fa-plus"></i>
</button>
</th>
</tr>
</thead>
<tbody>
<tr *ngFor="let item of clients | filter:term | paginate: { itemsPerPage: 2, currentPage: p } | orderBy:clients:true">
<td>{{item.id}} </td>
<td>{{item.name}} </td>
<td>{{item.phone}} </td>
<td>{{item.address}} </td>
<td>{{item.account}} </td>
<td>{{item.nots}} </td>
<td class="text-center">
<button class='btn btn-info'>
<span class="fa fa-edit"></span>
</button>
<button class="btn btn-danger">
<span class="fa fa-trash"></span>
</button>
</td>
</tr>
</tbody>
</table>
это декорация для ngx-order-pipe https://www.npmjs.com/package/ngx-order-pipe
Так есть что-то, что я пропустил