过滤后目录分页获取行数 - angularJs

Dir-paginate GET row count after filter - angularJs

我想在我的列表中显示过滤后的行数。 使用 dir-paginate ,结果总是 5 (== itemsPerPage) 或者我有 > 5 行。 有谁知道如何在我的目录分页中获取所有页面的行数?

<div>count filtered :  ({{ filtered.length }})</div>
<input type="text" class=" text-input form-control" ng-model="search.name"  placeholder="name">
<div class="col-md-6">
        <table class="table">
            <thead>
                <tr>
                    <th></th>
                    <th>Title</th>
                </tr>
            </thead>
            <tbody>
                <tr dir-paginate="person in persons | filter:_this.search  | itemsPerPage:5  as filtered" pagination-id="excluded">
                    <td>{{ person.name }}</td>
                </tr>
            </tbody>
        </table>
</div>
<dir-pagination-controls max-size="5"
         direction-links="true"
         boundary-links="true" class="pagination">
</dir-pagination-controls>

谢谢

您必须手动执行此操作行数

改变

 <tr dir-paginate="person in persons | filter:_this.search  | itemsPerPage:5  as filtered" pagination-id="excluded">

<tr dir-paginate="person in filtered = (persons | filter:_this.search)  | itemsPerPage:5 " pagination-id="excluded">

您可以通过 filtered.length

计算

Ref