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
Post a Comment