How to Get the Value Like First Drop Down Value Related to Another Drop Down Value using of Angular JS?

时光毁灭记忆、已成空白 提交于 2019-11-29 18:04:22
<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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!