Could someone please help me create something similar to this example: http://jsfiddle.net/PR6FM/, but using AngularJS?
<div ng-repeat="newCar in myCars">
<select ng-model="newCar.carId" ng-options="car.carId as car.name for car in cars | filter: {'carId': '!'+myCars[$index-1].carId}"></select>
</div>
<button type="button" ng-click="myCars.push({'carId':myCars.length+1, 'name': "someName"})">ADD</button>
I am trying to filter out previously selected cars from the list when adding new select boxes.
I understand that the current filter:
filter: {'carId': '!'+myCars[$index-1].carId}
may not be the best approach, but it's a starting point.