Angular limitTo with filter返回limitTo大小

时间:2016-05-25 12:32:57

标签: angularjs angular-filters angularjs-limitto

我正在尝试计算filtring之后剩余的rows

ng-repeat="person in filtered = ( data | filter:query | filter : name | filter {m_resource: resourceFilter} | filter : {m_id : idFilter} | limitTo:maxRowSize )"

然后使用{{ filtered.length }}获取行数,但由于maxRowSize,我得到limitTo。 有没有办法只在没有filtered.length的情况下获得limitTo

1 个答案:

答案 0 :(得分:0)

非常简单:像这样排除limitTo

ng-repeat="person in filtered = ( data | filter:query | filter : name | filter {m_resource: resourceFilter} | filter : {m_id : idFilter} ) | limitTo:maxRowSize "