![](/img/trans.png)
[英]AngularJS multiselect with hardcoded options doesn't update when model does
[英]AngularJS dropdown multiselect doesn't unchecked when selection change
我有這個褻瀆有一個例子的AngularJS下拉多元選擇,我的問題是選擇限制為1並且當我點擊列表中的任何其他項目時具有選擇的模型,直到取消選中前一個有 angularjs 經驗的人可以解決防止選擇項目直到取消選擇前一項的問題嗎?
var myApp = angular.module("myApp", ['angularjs-dropdown-multiselect']);
myApp.controller("MyController", ["$scope", function($scope) {
$scope.message = "Angularjs-multiselect-dropdown";
$scope.example6model = [{id: 1}, {id: 3}];
$scope.example6data = [{id: 1, label: "David"}, {id: 2, label: "Jhon"}, {id: 3, label: "Danny"}];
$scope.example6settings = {};
$scope.example65model = [{id: 1}];
$scope.example65data = [{id: 1, label: "David"}, {id: 2, label: "Jhon"}, {id: 3, label: "Danny"}];
$scope.example65settings = {selectionLimit: 1};
}]);
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.