【发布时间】:2016-12-31 17:24:20
【问题描述】:
您能告诉我如何在 UI -select 中设置默认值吗? 这是我的代码 http://plnkr.co/edit/tCrEM4oC9iMSYZffbEAX?p=preview 我希望 "Adrian" 应该默认选择。您能告诉我如何在模型示例 (21) 中设置 Adrian 年龄的默认值吗?
<ui-select tagging tagging-label="new tag" multiple ng-model="model.multipleDemo" theme="select2" ng-disabled="disabled" style="width: 300px;">
<ui-select-match placeholder="Select colors...">{{$item.name}}</ui-select-match>
<ui-select-choices repeat="color.age as color in people | filter:$select.search">
{{color.name}}
</ui-select-choices>
</ui-select>
<p>Selected: {{model.multipleDemo}}</p>
【问题讨论】:
标签: angularjs angularjs-directive angularjs-scope angular-ui-bootstrap angular-ui