How to get the value like first select drop down value related to another select drop down value using of angular js?
Hi all I have created two drop down field
<div>
<p></p>
<lable>Kp Users categories</lable>
<select ng-model="filter.Filtercategorieskp" ng-options="item.categories for item in users | filter:{roles: 'kp'}">
</select>
</div>
<div>
<lable>Kp Users</lable>
<select ng-model="Filterkp" ng-change="newClass=Filterkp.username" ng-options="item.username for item in users | filter:{ categories: filter.Filtercategorieskp.categories, roles:['kp']}">
</select>
</div>
Look at the HTML of Plunker's filter. it uses
filter:{roles: 'kp'}
and
filter:{ categories: filter.Filtercategorieskp.categories, roles:['kp']
But you use ilter:flterWithKp
If you want to filter with controller's method, you have to write two methods for two filter or you can use as like plunker.
I have update the plunker. You can check it:
Working plunker