Tek*_*uas 16 angularjs angular-ui ui-select2
我正在努力实现一些非常简单的事情:
<ui-select multiple ng-model="company.stack" theme="bootstrap">
<ui-select-match>{$$item.name$}</ui-select-match>
<ui-select-choices repeat="technology in technologies | filter: $select.search">
<div ng-bind-html="technology.name | highlight: $select.search"></div>
</ui-select-choices>
</ui-select>
Run Code Online (Sandbox Code Playgroud)
更改对象时,更改不会反映在model.stack模型中.我尝试将其更改为$ parent.company.stack,但它仍然无法正常工作.我错过了什么?我正在使用AngularJS v1.3.0-beta.17.
Aun*_*Aun 34
我也有类似的问题,与angular 1.3.14
和ui-select
和多项选择ui-select
指令绑定到一个数组.我无法将所选项目绑定到引用的数组中ng-model
.我通过包装selectedItems
到一个对象来实现它:
$scope.myObj = { selectedItems : []};
...
<ui-select ng-model="myObj.selectedItems" ...>
</ui-select>
Run Code Online (Sandbox Code Playgroud)
把selectedItems
直接上$scope
并没有为我工作.
归档时间: |
|
查看次数: |
11607 次 |
最近记录: |