我使用 ui.select2 进行下拉菜单
场景 我有一个返回下拉值的ajax调用
document.dropDownDocStatuses = [
{ key: 0, value: 'All active (' + response.totalDocuments + ')' },
{ key: 1, value: 'Draft (' + response.draft + ')' }
];
在 html 我有
<select ui-select2 class="form-control font-12px input-style3 "
ng-model="document.dropDownDocStatus"
ng-change="document.filterDocuments()">
<option ng-repeat="documents in document.dropDownDocStatuses" value="{{documents.key}}">({{documents.value}})</option> </select>
用户已选择值
当我使用更新下拉列表的任何值时立即 发出问题
_document.dropDownDocStatuses[_document.dropDownDocStatus].value++;
_document.dropDownDocStatuses[1].value++;
值得到更新,但它不会更改选定的值文本,而如果我点击下拉菜单,我会在下拉菜单中获得更改的值
有人可以指导我如何解决这个问题,任何帮助将不胜感激