我有以下代码:角度选择默认选项NG-需要
<select id="document" ng-model="document.Id" ng-options="option.Id as option.Name for option in documents" ng-required="IsDocumentRequired">
<option value="">Please Select Document</option>
</select>
的问题是,我不希望这个默认值(“请选择文档”),以满足所需的NG-标志设置为true时。
总之,我希望用户被迫选择一个非默认选项。
感谢
的回应现在不行吗? 'value =“”''
@bboyk参见plunker演示 –
只需使用'required'。这里没有要求使用'ng-required'。 – developer033