angular 设置select默认option选择值

<label class="item item-input item-select">
    <div class="input-label">
        报修类型
    </div>
    <select ng-model="formData.repaireType">
        <option selected value="">请选择</option>
        <option ng-repeat="item in repaireTypeList" value="{{item.id}}">{{item.name}}</option>
    </select>
</label>

1、select 标签中 ng-model 是绑定的option选择的值

2、第一个option是自己添加的,默认选中显示的值

猜你喜欢

转载自hbiao68.iteye.com/blog/2310570
今日推荐