1
我有两个下拉选择框,我使用AngularJS在下拉菜单中显示选项。使用select2()显示选择下拉选项()
在我的脚本中,当我使用$(".select2_demo_1").select2();
时,只有一个下拉菜单一次显示选定的选项。我想显示两个下拉菜单以显示选定的选项。请帮助。
<select id="one" class="select2_demo_1 form-control" ng-model="orgs" ng-options="item.OrganizationTypeTitle for item in organization"></select>
<select id="two" class="select2_demo_1 form-control" ng-model="industry" ng-options="i.IndustryTypeTitle for i in industries"></select>
var getOrganizationTypes = OrgService.getOrganizationTypes();
getOrganizationTypes.then(function (response) {
$scope.organization = response.data;
$scope.orgs = $scope.organization[0];
}, function() {
alert('can not get Organization Types!');
});
var getIndustryTypes = OrgService.getIndustryTypes();
getIndustryTypes.then(function (response) {
$scope.industries = response.data;
$scope.industry = $scope.industries[0];
}, function() {
alert('can not get industry types');
})