You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am using the groupBy filter, after groupBy filtering I would love to do orderBy filtering.
I have tried orderBy after the groupBy clause but that didn't work.
$scope.totalBrowserCount = function () {
var total = 0;
for (var i = 0; i < data.length; i++) {
var product = data[i].UniquePageviews;
total += product;
}
return total;
}
Above code groups the result and in the list it only shows each browser name. But as you can see few browsers have most unique visits (i.e. IE has 1800 in total), so I am expecting IE on the top of the list.
Did you ever find an answer? I'm having difficulty with this as well. I've moved the orderBy around both before and after the groupBy, I tried using toArray as in the example, and none of it seems to work.
Activity
mjortman commentedon Jan 9, 2017
Did you ever find an answer? I'm having difficulty with this as well. I've moved the orderBy around both before and after the groupBy, I tried using toArray as in the example, and none of it seems to work.
a8m commentedon Jan 9, 2017
Hi @mjortman, did you see this example?
Can you share a jsbin example with us?
Thanks
onigetoc commentedon Apr 9, 2017
I think this filter module should handle all common function like orderBy, sort ect.
Without manipuling ourself the javascript