I have a loop "ng-repeat" inside of
<select ng-model="something"></select>
where each option in a list is displayed as an
<option>
within the select block. My goal is to set "something" (which is an ng-model linked to select) to be the selected object from the list. Currently, when I use "value="{{option}}" as a parameter for option, I receive a JSON object as a String. However, what I actually need is to retrieve an object as an object. Here's how the code appears:
<select ng-model="something">
<option ng-repeat="option in list" value="{{option}}">{{option.name}}</option>
</select>
This specific requirement can be easily achieved using ng-options, but I also need to include additional "style" parameters based on option.anotherField for each
<option>