我有这个选择,我需要默认值为空,尝试添加一个值为“?”的选项并选择=“选中”,但它不会工作,任何想法?
<select class="form-control"
id="Select7"
name="grossweightmeasurementunitcode"
ng-model="itemForm.grossweightmeasurementunitcode"
ng-required="true">
<option ng-repeat="unidadepeso in unidadespeso" value="{{unidadepeso.commoncode}}">{{unidadepeso.sigla}}</option>
</select>
答案 0 :(得分:0)
试试这个:
<select
class="form-control"
id="Select7"
name="grossweightmeasurementunitcode"
ng-model="itemForm.grossweightmeasurementunitcode"
ng-required="true">
<option value="">--Select--</opton>
<option ng-repeat="unidadepeso in unidadespeso" value="{{unidadepeso.commoncode}}">{{unidadepeso.sigla}}</option>
</select>