Ng-repeat attribute filtering

Ionic faithfuls,

I have a list as shown in the codepen example, which I am trying to filter using the search input box. At present adding the specific attribute filter (filter:{}) is causing no items to show up at all whereas leaving it open ( works fine.

For the app I am trying to build, I will like the filter to be specific as I have more filters I will like to add for a more effective search.

Can anyone please guide me as to where I am going wrong with this?

Thanks in advance

I’m not an expert in filters, but in another web application I used angular in it seemed that it’s the property name that it will use. There may be a way to custom define it but I haven’t run into it. So for this particular app I had a text box with the model=“query.code” and then just like yours, i’d have my filter filter:query.code. Now if I wanted to filter by name I had to change the model to and the filter

I know it isn’t much, but I hope it gets you going in the right direction.


$scope.personSearch = {name: ''};


$scope.people = new Array(); 

Thanks @soutlink, that solved it for me.

1 Like