I have a data array which contains many objects (JSON format). The following can be assumed as the contents of this array:
var data = [
{
\"name\": \"
Since AngularJS 1.3 you can use aliases:
item in items | filter:x as results
and somewhere:
Total {{results.length}} result(s).
From docs:
You can also provide an optional alias expression which will then store the intermediate results of the repeater after the filters have been applied. Typically this is used to render a special message when a filter is active on the repeater, but the filtered result set is empty.
For example: item in items | filter:x as results will store the fragment of the repeated items as results, but only after the items have been processed through the filter.