I am working with two select elements. The first select is populated with names, and I would like the second select to only display the ages corresponding to the selected name.
For example:
If I select Jacob
in the first select, I want the Age
select to only show 27
as an option.
Here is a demonstration on Plunker.
<table ng-table="tableParams" show-filter="true" class="table">
<tr ng-repeat="user in $data" ng-class="{ 'emphasis': user.money > 500 }">
<td data-title="'Name'" filter="{ 'name': 'select' }" filter-data="names($column)">
{{user.name}}
</td>
<td data-title="'Age'" filter="{ 'age': 'select' }" filter-data="ages($column)">
{{user.age}}
</td>
</tr>
</table>
I am looking for a way to dynamically filter the options in the second select based on the selection made in the first select element. How can I achieve this?