加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 综合聚焦 > 服务器 > 安全 > 正文

dir-pagination指令angularjs:过滤后更新分页

发布时间:2020-12-17 06:58:58 所属栏目:安全 来源:网络整理
导读:我使用dir-pagination指令进行分页,它的工作正常,但过滤分页时没有得到更新 以下是我的代码: tbody dir-paginate="booking in bookinglist | itemsPerPage: 30 | orderBy:sortKey:reverse" tr ng-repeat="orders in booking.order | filter: booking_filter
我使用dir-pagination指令进行分页,它的工作正常,但过滤分页时没有得到更新

Error-Dir-Pagination

以下是我的代码:

<tbody dir-paginate="booking in bookinglist | itemsPerPage: 30 | orderBy:sortKey:reverse">
        <tr ng-repeat="orders in booking.order | filter: booking_filter | dateRange: startDate : endDate | orderBy:sortKey:reverse">
          <td>{{booking.customer_name}}</td>
          <td>{{orders.order_id}}</td>
          <td>{{orders.service_name}}</td>
          <td>{{orders.employee_name}}</td>
          <td>{{orders.area_name}}</td>
          <td>{{orders.booking_date | date:"dd/MM/yyyy"}}</td>
          <td>{{orders.booking_time}}</td>
          <td>{{orders.status}}</td>
          <td class="g-btn-full-width">
            <button type="button" ng-click="EditBooking(orders._id)" class="btn btn-primary"><span class="fa fa-pencil"></span></button>
            <button type="button" ng-click="DeleteBooking(orders._id)" class="btn btn-danger"><span class="fa fa-trash"></span></button>
            <button type="button" ng-click="InvoiceGenerate(orders._id)" class="btn btn-warning">Invoice</button>
          </td>
        </tr>
      </tbody>
    </table>
    <dir-pagination-controls>
        max-size="5"
        direction-links="true"
        boundary-links="true"
    </dir-pagination-controls>
    </div>

我坚持这个…帮助将非常感激

解决方法

你必须在你的标签中使用filter:booking_filter,你已经放了dir-paginate

<tbody dir-paginate="booking in bookinglist | filter: booking_filter | itemsPerPage: 30 | orderBy:sortKey:reverse">

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读