javascript - AngularJS: Filtering not working -


i have ng-repeat defined so:

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

a city { attributes: {name: 'boston'} }

and form so:

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

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

your filter term should like:

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

and set model value of search:

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


Comments

Popular posts from this blog

How to mention the localhost in android -

php - Calling a template part from a post -

c# - String.format() DateTime With Arabic culture -