1.若是浏览器为ie10,页面上select使用了ng-if,则页面回显时候,该select下拉框没法回显,必须点击一下才能够回显。应该少用ng-if,会建立子集做用域,用ng-show能够替代。还能够利用ng-options来解决。浏览器
<div class="form-group" ng-if="vm.stsType == 1 && vm.tariff.type != 2"> <label class="col-lg-3 control-label"> <span class="text-danger">*</span> <span translate="ValidDate"></span> </label> <div class="col-lg-8"> <select class="form-control" name="validDate" ng-model="vm.tariff.validDate" ng-options="d for d in [0,1,2,3,4,5,6,7]" disabled> </select> </div> </div>
2.当下拉框中option使用了translate指定国际化时,也会有该问题。例如spa
这样页面加载后必须点击才会回显国际化,是有问题的,应该用orm
ng-options="option.vaule as option.i18n | translate for option in vm.options"
vm.options=[{vaule: "",i18n:"common.select"}, {vaule:0,i18n:"ami.crm.usertype.stock_threshold"}, {vaule:1,i18n:"ami.crm.usertype.unpaid_threshold"}];
来代替这种下拉框展现,能够完美解决。作用域