I have a HTML select box at the top of a page, the page shows a list of documents. The select box will have a list of available file extensions to filter the list of documents by. At the moment, I have:
<select data-ng-model="filterType">
<option data-ng-repeat="item in docItems" value="{{item.extension}}">{{item.extension}}</option>
</select>
What the above code does is give me a list, for example:
- xls
- xls
- xls
- doc
- xls
But what I am wanting is to only show something like:
- xls
- doc
So, it only shows one of each available values.
It's also important that the extension stays as the options value, as this is what I am using on my filter, like so:
data-ng-repeat="docItem in docItems | filter:{extension: filterType}"