Stop Angularjs Instant Search
I have built a simple search form in my AngularJS app, that as you type uses the built in filter magic of angular to filter a list of phones. I've wrapped mine in a form as when th
Solution 1:
Use 2 different variables for the ng-model of the input (ng-model="$parent.query"
) and the parameter of the filter (| filter:filterQuery
). This will make the input and the filter unrelated to each other. Then when the form is submitted (in queryChanged
), update the filter parameter with the value of the ng-model ($scope.filterQuery = $scope.query
).
Post a Comment for "Stop Angularjs Instant Search"