在我的应用程序中,我使用的是jQuery 1.7(不要问为什么:( )与angularjs1.2.5和select2。我使用ui-select2 2与angularjs进行select2集成。
更新到ui-select2 2的最新版本后,插件停止选择值.在指令添加对angularjs1.2.x 此承诺的支持的指令中添加的priority: 1选项似乎存在这个问题。
演示:柱塞
有人面临过这个问题吗?
脚本
var app = angular.module('my-app', ['ui.select2'], function () {
})
app.controller('AppController', function ($scope) {
$scope.transition = {};
var results = [{
id: '1',
text: 'One',
type: 1
}, {
id: '2',
text: 'Two',
type: 1
}, {
id: '3',
text: 'Three',
type: 1
}, {
id: '4',
text: 'Fout',
type: 1
}]
$scope.select2Options = {
id: 'id',
data: results,
multiple: true
}
})HTML:
<body ng-controller="AppController">
<input class="trans-values" ui-select2="select2Options" ng-model="transition.value" style="width: 150px" multiple />
</body>https://stackoverflow.com/questions/20701692
复制相似问题