I have a form with some input types like text, radio etc. When I submit the form, it lists the entered details below the form(used template and directive for this). I want to do filter in age , ie, the number input type, such that when I give an age range, it should filter profiles with corresponding age range. Here is the plunker :
http://plnkr.co/edit/h8p8rtZuAhCoKClUjgE9?p=preview
<table border="1" style="width:200px">
<tr>
<td> <div>Name : {{ formElement.name }} </div><br> </td>
</tr>
<tr>
<td> <div>Age : {{ formElement.age }}</div><br> </td>
</tr>
ngRepeat. So you need find a way to share thefilterModelobject between your directives (either using a parent scope or a service). Note though, that it is highly unusual to have the filtering logic separated from the display logic that the filter applies to. It would be a better idea to place the filtering-related stuff in thefasterDisplaydirective. - gkalpak