我使用 Angular UI https://github.com/angular-ui/ui-select。
我对控件的使用有一点问题。我想完全避免使用箭头(不幸的是,这似乎允许用户提交整个表单)。见下图红圈:
下面是对应的html:
<div class="form-group">
<label for="address" class="control-label col-lg-3">signup.form.address</label>
<div class="col-lg-6">
<ui-select ng-required="true" id="address" name="address" ng-model="signupForm.addressReference" reset-search-input="false" theme="bootstrap">
<ui-select-match placeholder="Select address...">{{$select.selected.description}}</ui-select-match>
<ui-select-choices repeat="address.reference as address in addresses track by $index" refresh="chooseAddress($select.search)" refresh-delay="0">
{{address.description }}
</ui-select-choices>
</ui-select>
</div>
<div ng-messages="signupNgFormCtrl.address.$error" ng-if="signupNgFormCtrl.$submitted" class="col-lg-3">
<div ng-message="required">required</div>
</div>
</div>
有人可以帮忙吗?
问候,