0

I have an ng-repeat defined as so:

{"ng-repeat" => "city in cities() | filter: search"}

A city is { attributes: {name: 'Boston'} }

And a form like so:

%input{:type => "search", "ng-model" => "search.attributes.name"}

But it's not working, how can I filter based on city.attributes.name ?

1 Answer 1

1

Your filter term should be like:

city in cities() | filter: {attributes: {name: search}}

And then set your model to the value of search:

%input{:type => "search", "ng-model" => "search"}

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.