I want the filter functionality to work just like this fiddle in the first comment below but without catching the checkboxes category from ng-repeat, I just want to write the checkboxes' value and get the filtered words as they written in the checkboxes' value in HTML.
-
this is the fiddleMuho– Muho2017-02-11 08:31:37 +00:00Commented Feb 11, 2017 at 8:31
-
1Is this what you are looking for? jsfiddle.net/wYfs4/739Developer– Developer2017-02-11 08:45:01 +00:00Commented Feb 11, 2017 at 8:45
-
thank you so much, I am so grateful for your help because I have been stuck in this from a week.Muho– Muho2017-02-11 12:41:37 +00:00Commented Feb 11, 2017 at 12:41
-
Glad I helped. Happy coding...Developer– Developer2017-02-11 13:14:07 +00:00Commented Feb 11, 2017 at 13:14
Add a comment
|
1 Answer
You could do this just like normal checkboxes- only catch is that the value should be properly bound using ng-model to the required controller property.
<input type="checkbox" ng-model="ctrl.filter.red" value="red"> Red <br>
<input type="checkbox" ng-model="ctrl.filter.white" value="white"> White <br>
<input type="checkbox" ng-model="ctrl.filter.champagne" value="champagne">Champagne