I am trying to modify my ng-options
element so that it only displays unique values.
Currently, it looks like this:
https://i.sstatic.net/5CtSk.png
However, I want it to display one value at a time. For example:
<select class="form-control" ng-model="main.singleProductListSelected">
<option value="test_pizza">Pizza Favorites</option>
<option value="test_pasta">Pasta</option>
<option value="test_salads">Salads</option>
</select>
The current HTML code is as follows:
<select class="form-control"
ng-model="main.singleProductListSelected"
ng-options="singleOrdersProduct.category.name
for singleOrdersProduct in main.singleOrdersProductOptions">
</select>
Is there a way to achieve this without changing the variable result?
Thank you!