2
I need to insert a dynamic filter, which comes from a select, into my ng-repeat
select ng-model="campoBusca"
input type="text" ng-model="busca"
ng-repeat="funcionario in funcionarios | filter: { campoBusca: busca}"
but not for sure, some other alternative?
That is, but when changing the filter it must empty the other fields, for example the field 1 is selected and has as value "John", when selecting the field 2 it must change the value of the field 1 to ""
– user3388
In the function of the example,
$scope.changeFilterToyou can check which is the type of the parameter, and then clear the other fields of the$scope.search, simple– Josh