this is great. thanks!
On Tuesday, July 22, 2014 10:44:17 AM UTC-6, Pawel Kozlowski wrote:
>
> Hi!
>
> One way of doing it is to assign the filtered expression to a temp
> variable like so:
>
> <tr data-ng-repeat="qualifier in filteredQualifiers = (qualifiers |
> orderBy:predicate:reverse | filter:search:strict)">
>
> and then, for ex.:
>
> {{filteredQualifiers.length}}
>
> The full example in action here:
>
> https://github.com/angular-app/Samples/blob/master/1820EN_04_Code/08%20-filters%20-%20array%20filters%20full%20example/index.html#L34
>
>
> In the near feature it is going to get a bit easier thnx to this commit:
>
> https://github.com/angular/angular.js/commit/e0adb9c452e172295209f785b62472688225fffb
>
>
> Cheers,
> Pawel
>
> On Tue, Jul 22, 2014 at 6:02 PM, Adam Gordon <[email protected]
> <javascript:>> wrote:
> > So, this works, but I'm betting it's applying the filter again (which
> seems
> > overkill) and it doesn't actually give me access to the filtered items.
> If
> > anyone has a cleaner or better way. Please let me know.
> >
> > Row Count: {{ (qualifiers | filter:search:strict).length }}
> >
> > On Tuesday, July 22, 2014 9:49:15 AM UTC-6, Adam Gordon wrote:
> >>
> >> I have filter boxes tied to my grid data and everything is working
> great.
> >> I'd like to add a row count that updates with the number of items
> displayed
> >> but don't know the name of the scoped variable that stores either the
> >> filtered items (or the count) and the angular documentation doesn't
> indicate
> >> how to access this. Does anyone know?
> >>
> >> Here's the code snippet:
> >>
> >> Row Count: {{ what_goes_here? }}
> >>
> >> <!-- snip -->
> >>
> >> <tr data-ng-repeat="qualifier in qualifiers | orderBy:predicate:reverse
> |
> >> filter:search:strict">
> >>
> >> I do know that "search" is in my $scope.
> >>
> > --
> > You received this message because you are subscribed to the Google
> Groups
> > "AngularJS" group.
> > To unsubscribe from this group and stop receiving emails from it, send
> an
> > email to [email protected] <javascript:>.
> > To post to this group, send email to [email protected]
> <javascript:>.
> > Visit this group at http://groups.google.com/group/angular.
> > For more options, visit https://groups.google.com/d/optout.
>
>
>
> --
> AngularJS book:
> http://www.packtpub.com/angularjs-web-application-development/book
> Looking for bootstrap-based widget library for AngularJS?
> http://angular-ui.github.com/bootstrap/
>
--
You received this message because you are subscribed to the Google Groups
"AngularJS" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.