在我的角度应用程序中有一个多选下拉列表。当前使用https://github.com/amitava82/angular-multiselect
。但是当从控制器内部设置所选选项时。占位符显示为“3 Selected”,但与选项关联的复选框不是check.My html是
<am-multiselect class="" multiple="true" ms-selected ="There are {{oldtag.length}} tags are selested"
ng-model="oldtag" ms-header="Choose Incentive Pay"
options="oldtag as oldtag.tag_name for oldtag in masterTagList"
change="selected()">
</am-multiselect>
在我的控制器中
$scope.masterTagList = [{
"tag_id": 1,
"tag_name": "fish"
}, {
"tag_id": 2,
"tag_name": "meat"
}, {
"tag_id": 3,
"tag_name": "egg"
}];
$scope.oldtag = [{
"tag_id": 1,
"tag_name": "fish"
}];