I need to have two drop down lists that contain integers 1 to 9 each initially. I think I can do that using something like the following:
<--html area-->
<select ng-repeat="num in MaxCupcakes">
<option ng-model="num" />
</select>
<select ng-repeat="num in MyCupcakes">
<option ng-model="num" />
</select>
<--script area -->
var app = angular.module("app", []);
app.controller('Ctrl', function() {
$scope.MaxCupcakes = [1,2,3,4,5,6,7,8,9];
$scope.MyCupcakes = [1,2,3,4,5,6,7,8,9];
});
Once I get this setup correct I would like what ever is selected in MaxCupcakes to limit the number in MyCupcakes. For example, if I set max cupcakes to 5, then I can only select 1-5 in mycupcakes.
ng-repeatwould be used on<option>but more common to useng-optionson<select>