我
var app = angular.module("myApp", []);
app.controller('anotherOption',function($scope){
$scope.options = [{name: "MakeUp"},{name: "PickUp"}];
$scope.OptionItems=[{
value:null
}];
$scope.duplicateOptionItem = function() {
$scope.OptionItems.push({});
}
});
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.2.23/angular.min.js"></script>
<html ng-app="myApp" ng-controller="anotherOption">
<select class="big_select" ng-model="OptionItem.value" ng-repeat="OptionItem in OptionItems | limitTo: options.length">
<option value="" disabled selected hidden>Items select</option>
<option ng-repeat="option in options" value="{{ option.name }}">{{ option.name}}</option>
</select>
<button ng-click="duplicateOptionItem()">+</button>
我已经可以做到,但问题是,我想过滤它,所以每次我添加更多的组合框时,它应该只显示未选择的项目。 请帮忙..谢谢
目标: 当我在第一个组合框中选择Pick-Up然后单击+按钮, 它应该添加更多的组合框,只有化妆选项。