ngRepeat Filter by deep property

前端 未结 4 1462
一向
一向 2020-11-27 03:40

If I have a complex object with objects as property values, how can I filter by one of the nested properties?

Can this be done with the OOB ng-repeat filter?

4条回答
  •  心在旅途
    2020-11-27 04:34

    If you are filtering multiple properties then the syntax would be similar to below.

    • ...

    eg:

            var employees = [name: 'John', roles: [{roleName: 'Manager'},{roleName: 'Supervisor'}]];
    
            
  • ...
提交回复
热议问题