for the customerGroup selector I would like the option value to be test[i][1] of the multidimensional array and the text of the options to be test[i][0] of the array. How should I change ng-options?
For example if the 2D array consisted of [1,7],[2,8],[3,9] elements. I would like it to turn into <option value="1">7</option>
etc etc
<select ng-model = "selectedGroup" class = "customergroup" ng-options = "val[][0] for val in cgOptions() track by val[][1]">
<option value = "">Select</option>
</select>
Also, on a side note is it possible to pass the function cgOptions later on into another function's parameter with something like exampleFunction(cgOptions)?
$scope.cgOptions = function () {
var test = [];
for (var i = 0; i < 4; i++) {
test[i][0] = i;
test[i][1] = i+10;
}
return test;};
Thank you in advance!