Angular filter on child property

Viewed 8882

Hi I need to filter an angular list based on a child property.

I have this model:

  $scope.data = [{name:"John",type:{talent:"genius"}},
                 {name:"Paul",type:{talent:"genius"}},
                 {name:"Ringo",type:{talent:"lucky"}}];

I need to display a list of name of only talented people. So I was trying something like this:

item in data|myFilter:item.type

http://jsbin.com/ObIqUyix/1/edit

1 Answers
Related