如何在 Angular JS 中使用 ng-if 条件隐藏选项值
How to hide option value using ng-if condition in Angular JS
我有一个输入表单。如果条件为真,我想比较和显示值的两个输入字段。
输入字段是:-
<td class="td_label"><label>Client Age :</label></td>
<td class="td_input"><input type="text" required="required" class="age" ng-model="age" name="age" maxlength="2">
</td>
<td class="td_label"><label>Test Age :</label></td>
<td class="td_input"><input type="number" required="required" class="libr" ng-model="libr" name="libr" min="50" max="100">
</td>
<td class="td_label"><label>Rider Cost :</label></td>
<td class="td_select"><select ng-model="rider" name="rider" required>
<option value="">Please Select</option>
<option value="0.0001">Option 1 - 3% No Rider</option>
<option value=".75">Option 2 - IAV 5.5% Rider .75%</option>
<option value=".9">Option 3 - IAV 6.0% Rider .90%</option>
<option value=".85">Option 4 - IAV 5.5% Rider .85%</option>
<option value="1.0">Option 5 - IAV 6.0% Rider 1.0%</option>
</select></td>
现在,如果差异测试年龄 - 年龄超过 10 岁,我希望 select 选项中的第三个选项不适用。我能做什么?
我有一个输入表单。如果条件为真,我想比较和显示值的两个输入字段。 输入字段是:-
<td class="td_label"><label>Client Age :</label></td>
<td class="td_input"><input type="text" required="required" class="age" ng-model="age" name="age" maxlength="2">
</td>
<td class="td_label"><label>Test Age :</label></td>
<td class="td_input"><input type="number" required="required" class="libr" ng-model="libr" name="libr" min="50" max="100">
</td>
<td class="td_label"><label>Rider Cost :</label></td>
<td class="td_select"><select ng-model="rider" name="rider" required>
<option value="">Please Select</option>
<option value="0.0001">Option 1 - 3% No Rider</option>
<option value=".75">Option 2 - IAV 5.5% Rider .75%</option>
<option value=".9">Option 3 - IAV 6.0% Rider .90%</option>
<option value=".85">Option 4 - IAV 5.5% Rider .85%</option>
<option value="1.0">Option 5 - IAV 6.0% Rider 1.0%</option>
</select></td>
现在,如果差异测试年龄 - 年龄超过 10 岁,我希望 select 选项中的第三个选项不适用。我能做什么?