I try to show just one specific property of a filtered array. Is there a way to show a property without using a custom method in my controller? I mean directly in the view?
my order.options array:
[
{value: '0', text: 'random'},
{value: '1', text: 'names'},
{value: '2', text: 'ages'}
]
My view:
<span>{{order.options | filter:order.value}}</span><!-- I need help here -->
<select ng-model="order.value">
<option value="{{option.value}}" ng-repeat="option in order.options">{{option.text}}</option>
</select>
If the user orders the list by changing the select, I want to show the text of the selected value somewhere (the value in order.options[INDEX].text)
For example, if the user selects 'random' in the select, random shoud be shown in a span before the select.
I have to use different values and texts in my options, because im ordering the list next to the select by the value (whis is a property of the list item)