Thanks! I was able to work with that.
On Tuesday, July 3, 2012 9:24:46 AM UTC-5, Jakub Arnold wrote:
>
> I have a list created via *ng-repeat* with a *filter:query* and I want to
> be able to show an element if there are no elements left by the filter.
>
> Basically my idea would be something like this, where I assign a class
> based on the count of the displayed elements
>
> <input ng-model="query" name="query">
>
> <ul>
> <li ng-repeat="todo in todos | filter:query">{{todo}}</li>
> </ul>
>
> <p class="display-{{something like todos.length}}">There are no todos for
> given query</p>
>
> The problem is, that *.length* doesn't get updated with the filter, and
> something like *todos.count()* doesn't work.
>
> What is the proper way of doing this?
>
--
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.