Is it possible to use the limitTo filter in the limitTo directive, which repeats the properties of the object, and not the elements in the array.
I know that the official documentation says that the input to limitTo should be an array or a string. But I wonder if there is a way to make this work.
Here is a sample code:
<li ng-repeat="(key, item) in phones_dict |orderBy:'-age'| limitTo:limit_items"></li>
And $scope.phones_dict is an object like
{ item_1: {name:"John", age: 24}, item_2: {name:"Jack", age: 23} }
javascript angularjs angularjs-filter angularjs-ng-repeat
Yogesh mangaj
source share