1、 <select class="form-control" ng-model="xlsbName" ng-change="chooseByXLSBName('{{device.kdsbjcName}}')"
ng-options="xlsbName for xlsbName in xlsbNames">
<option value="">总和</option> <!--若选中该选项, 此时xlsbName 为null -->
ng-options="xlsbName for xlsbName in xlsbNames">
<option value="">总和</option> <!--若选中该选项, 此时xlsbName 为null -->
</select>
2、 <select class="form-control" ng-model="slsbName" ng-change="chooseBySLSBName('{{device.kdsbjcName}}')">
<option value="总和">总和</option>
<!--若选中该选项, 此时slsbName 为“总和” -->
<option ng-repeat="slsbName in slsbNames" value="{{slsbName}}">{{slsbName}}</option>
</select>
本文介绍了如何使用HTML选择器实现设备配置的动态选择,并通过Angular进行双向数据绑定,展示了如何根据选择项更新设备配置。
756

被折叠的 条评论
为什么被折叠?



