I’m very new to AngularJS and was playing with filters today. I was able to apply the
filter filter to display only rows matching the criteria from the select menus. However, I was unable to add a "clear filter" function to the button. How can I reset the filter when the button is clicked?
In the following Plunker, you can see the code I was using in attempts achieve this: Plunker — AngularJS Sample
Problem courtesy of: Sparda
You can use
ng-click to bind click handler to clear
query variable within a scope.
Plunker is an online community for creating, collaborating on and sharing your web development ideas.plnkr.co
Solution courtesy of: Tosh