I am using AngularJS and what i want to do is to use a select to select an item, but then have access to an array that can produce other information.
Eg:
<select name="manufacturer" id="manufacturer" ng-model="manufacturer" class="form-control">
    <option value="{{ A[0] }}">{{ A[0] }}</option>
    <option value="{{ B[0] }}">{{ B[0[ }}</option>
    <option value="{{ C[0] }}">{{ C[0] }}</option>
</select>
// NAME, SKU, PRICE, WEIGHT
$scope.A = ["Ferarri","FER1",128000,1.5];
$scope.B = ["Ford","FOR1",13000,1];
$scope.C = ["Renault","REN1",13000,1];
So, I can easily print the 'name' in the select for the user to know what they're selecting, but once selected, I want to have full use of that array. So, if the user chooses 'Ford' I want to be able to have something like $scope.car[2] for the price of the car, whatever their selection might be which would give me '13000'.
What would be the best way to do this?
Thanks.
carobjects tong-options, and select one easily. also, having these as objects would make working with them make more sense; i.e.$scope.car.priceis much clearer than$scope.car[2].