I'm trying to automatically bind the second value in a select drop-down menu that I've created using a list of numbers ranging from 0.01 to 10.
getNumbers();
function getNumbers() {
$scope.numbersArray = [];
for (var j = 1, i = 0.01; i <= 10; i += 0.01, j++) {
var newArray = {
id: j,
value: i
}
$scope.numbersArray.push(newArray);
}
}
Below is the select dropdown I have set up:
<select ng-model="test.info" class="form-control" ng-options="r.id as r.value for r in numbersArray" tabindex="1">
<option value="">--Select--</option>
</select>