Angular ng-repeat filter on subarray

后端 未结 2 932
闹比i
闹比i 2021-01-24 07:51

Using Angular, I\'m trying to filter using ng-repeat on FactorName given the following schema.
Filtering using <... ng-model=\"query.Factors.FactorName\" ...> doesn\'t wo

2条回答
  •  Happy的楠姐
    2021-01-24 08:08

    I figured it out to make the filter on any of the elements of the array Factors, but could not figure how to select just one field of the array. Maybe it just works for you:



    Filtered:

    {{d}}

    And the initialization on JS:

    $scope.filtervalue = {};
    

    Sample on jsfiddle:

    http://jsfiddle.net/jordiburgos/QFUu6/
    

提交回复
热议问题