Answer the question
In order to leave comments, you need to log in
How to implement sorting or filtering with radio buttons in Angular?
Hello, tell me how to implement sorting by radio buttons in angular. The essence of the problem is this: you need to implement sorting as in an online store. There is a radio button, and when you click on it, the products should be sorted. For example, there is a button for the availability of goods, and if we click on it, then we will see a list with goods that are in stock.
Here is the code:
<p>По наявности: </p>
<input type="radio" name="status" value="status"> Есть в наличии<Br>
<input type="radio" name="status" value="no_status"> Под заказ<Br>
Answer the question
In order to leave comments, you need to log in
You hang ng-change="myFunc()" on the form and filter it in the controller.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question