$count() in angular 1.0.0rc4

717 views
Skip to first unread message

Alex Nertus

unread,
Apr 11, 2012, 10:26:04 AM4/11/12
to AngularJS
Hi there,
I use angular.js 1.0.0rc4 and want to use $count as in v0.9
for example:
v0.9:
{{users.$filter(query).$orderBy(selected,reverse).$count()}}

v1.0.0rc4:
{{users | filter:query | orderBy:predicate:reverse}} -> I want to use
count() here

the question is: How can I use count() in lastest Angular version?
Thanks!

Vojta Jína

unread,
Apr 11, 2012, 4:42:29 PM4/11/12
to ang...@googlegroups.com
We removed all type augmentation. People should rather use ES5 methods (like filter) and load ES5 shim for old browsers.

Check out this:

Btw, in this example, you do all the filtering and sorting twice, right way would be do it in JS:

V.


--
You received this message because you are subscribed to the Google Groups "AngularJS" group.
To post to this group, send email to ang...@googlegroups.com.
To unsubscribe from this group, send email to angular+u...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/angular?hl=en.


Alex Nertus

unread,
Apr 11, 2012, 5:50:04 PM4/11/12
to AngularJS
Thanks a lot!
Reply all
Reply to author
Forward
0 new messages