I'm trying to retrieve the first selected value and then run an ajax call to get the 2nd set of data based on the first selected selected value.
HTML:
<label class="item item-input item-select">
<div class="input-label">
Select First:
</div>
<select>
<option ng-repeat="object in objects" value="object.ID">{{object.value}}</option>
</select>
</label>
<label class="item item-input item-select">
<div class="input-label">
Select 2nd:
</div>
<select>
<option></option>
</select>
</label>
Controller Side:
...
dataFactory.getRequestObject(ID).then(function(resp2){
console.log("Getting data to populate select list!");
console.log(resp2.data);
$scope.objects= resp2.data;
}, function(err){
console.error('ERROR', err);
});
Where getRequestObject(ID) is my function which calls my webservice.
I'm able to get my first set of data, I would like to get the "value" of the first and invoke the retrieving of the 2nd select list of data. How would I go around doing it?