M
M
Max2015-05-03 13:57:38
JavaScript
Max, 2015-05-03 13:57:38

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

2 answer(s)
T
TekVanDo, 2015-05-03
@maxprof

so jsbin.com/jolasutoze/1/edit?html,output

A
Alexey Sergeev, 2015-05-03
@SergeevAI

You hang ng-change="myFunc()" on the form and filter it in the controller.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question