javascript - Cannot load option values in select in angularjs -


when search_dropdown values set, using selected value index need set value of filtertext dropdown.

<div class="form-group" data-ng-repeat="filter in filtersarray track $index">                 <select name="search_dropdown"                         ng-model="search_dropdown[filter]"                         class="form-control">                     <option value="">select filter field</option>                     <option data-ng-repeat="t in list_fields" value="{{t.field}}">{{t.displayname}}</option>                 </select>             <select name="filtertext" class="form-control" ng-model="filtertext[filter]">                 <option value="">select filter text</option>                 <option data-ng-repeat="t in list['{{search_dropdown[filter]}}'] track $index" value="{{t}}">{{t}}</option>             </select> 

search_dropdown = ['name','description'] , value of list['name'] = ['a','b'] , list['description'] = ['c','d'] list object.

<option data-ng-repeat="t in list['{{search_dropdown[filter]}}']  track $index" value="{{t}}">{{t}}</option> 

here how set value of filtertext dropdown a,b when name selected in search_dropdown , c,d when description selected?


Comments