javascript - Angularjs ui-select 标记不起作用

标签 javascript angularjs select tags ui-select

情况:

我有一个发送电子邮件的 Angular 应用程序。
共有三个字段:地址 - 主题 - 文本。
地址字段是使用 Angular ui-select 构建的

电子邮件地址可以从列表中选择,也可以重新输入。
问题是我无法创建新条目。

文档中写道,为了输入新值,可以使用属性 tagging .

但我不知道为什么,没有和我一起工作。


代码:

(简单的新标签添加示例)

<ui-select multiple tagging tagging-label="(custom 'new' label)" ng-model="multipleDemo.colors" theme="bootstrap" ng-disabled="disabled" style="width: 300px;">

    <ui-select-match placeholder="Select colors...">{{$item}}</ui-select-match>

    <ui-select-choices repeat="color in availableColors | filter:$select.search">
        {{color}}
    </ui-select-choices>

</ui-select>


$scope.availableColors = ['Red','Green','Blue','Yellow','Magenta','Maroon','Umbra','Turquoise'];
$scope.multipleDemo = {};
$scope.multipleDemo.colors = ['Blue','Red'];


骗子:

http://plnkr.co/edit/T55LeKK66Idb3lD8DDPz?p=preview

如您所见,无法插入新值。


问题:

如何在 Angular ui-select 中正确插入新值?

最佳答案

给出的 plunkers 使用 0.8.2。标签适用于 0.8.3。

关于javascript - Angularjs ui-select 标记不起作用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/27225834/

相关文章:

javascript - Blockstack App 在 npm install ERR 上失败!配置错误

javascript - d3.js 中单元格尺寸太小时删除文本

javascript - AngularJS $scope.model 未定义

angularjs - angularjs 中具有独立范围的自定义验证指令?

mysql - 嵌套选择...来自模拟的完整外部联接

mysql - 从mysql中的值中选择

javascript - Select2 选项 templateResult 未被调用

javascript - 自动填写外部网页的特定登录表单

asp.net - IdentityServer 3 使用刷新 token 刷新用户

mysql - MySQL 有没有办法在单个语句 t 中更新和选择更新的行?