This repository was archived by the owner on Apr 12, 2024. It is now read-only.
This repository was archived by the owner on Apr 12, 2024. It is now read-only.
Implement filtering on object-based ng-repeat #6490
Closed
Description
Currently if you are using the ng-repeat directive to walk over the properties of a non-array object, filters will not work as they test immediately if the collection is an array and reject anything not matching.
This behavior can be seen here:
angular.js/src/ng/filter/filter.js
Line 118 in 06f2ba8
This is an undocumented and - per #6215 - potentially unwanted behavior, since the syntax is the same for iterating over arrays and objects. Plus, it's just darn useful!
Opening up the lines of discussion here to see if it's worth implementing filter functionality for objects and not just straight array/array-like structures.