Leeuwtje Leeuwtje - 1 year ago 76
AngularJS Question

how to display the number of filtered rows outside table definition?

I have implemented a filter for my

. Trying to display the number of filtered items like this:

How to display
of filtered rows here? Outside the table definition?

result(s) matching the filter

<table ng-table="tableParams" class="table">
<tr ng-repeat="account in filtered =($data | filter:search.accountName | filter:search.id)">
<td data-title="'id'">
<td data-title="'name'">


plunkr: http://plnkr.co/edit/Sx4YAO?p=preview

Answer Source

Just add $parent before your filtered in your ng-repeat and you should be fine. Ng-repeat has an isolated scope.

<tr ng-repeat="account in $parent.filtered =($data | filter:search.accountName | filter:search.id)">

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download