0

我们可以将默认的 HTML 必填字段验证警报框设置为 UI-Select,就像给出的链接中的那个一样。如果是这样,如何?

https://www.google.co.in/imgres?imgurl=http://i.stack.imgur.com/R3h1L.png&imgrefurl=https://stackoverflow.com/questions/18770369/how-to-set- html5-required-attribute-in-javascript&h=178&w=675&tbnid=j8M7AwOECpa80M:&docid=NL_CUnsolMwYCM&ei=HICwVtbjJouyuASina_4Dg&tbm=isch

编辑:我的代码类似于

<ui-select ng-model="selectedName" name="nameSelect" required>
   <ui-select-match allow-clear="true" placeholder="Select a value">
   {{$select.selected.firstname + ' ' +$select.selected.lastname }}
   </ui-select-match>
   <ui-select-choices repeat="name in names | propsFilter: {firstname: $select.search, lastname: $select.search}" >
       <div ng-bind-html="name.firstname +  ' '+name.lastname   | highlight: $select.search">
       </div>
  </ui-select-choices>
</ui-select>

名称作为用户的名字和姓氏列表。

4

0 回答 0