Skip to content
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
@quantizor

Description

@quantizor

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:

if (!isArray(array)) return array;
(thanks @caitp !)

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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions