Unique ng-options in Angular
<p>I am trying to get unique results in angular ng-options on a select box. </p>

<pre><code>&lt;select ng-model="nationality" id="nationality" 
        ng-options="player as player.nationality for player in players&gt;&lt;/select&gt;
</code></pre>

<p>The above code will get me all the nationality's however it show's duplicates.</p>

<pre><code>&lt;select ng-model="nationality" id="nationality" 
        ng-options="player as players | unique: 'player.nationality'"&gt;&lt;/select&gt;
</code></pre>

<p>When I try this code angular throw's errors and shows me nothing in the select box.</p>

<p><em>Controller</em></p>

<pre><code>var app = angular.module('premierLeagueDB', []);
app.controller('mainCtrl', function($scope, $http) {
$http({
    method : "GET",
    url : "api.php/clubs",
}).then(function mySucces(response) {
    $scope.clubs = response.data.club;
}, function myError(response) {
    $scope.showError = response.statusText;
});
});
</code></pre>

<p>Thanks.</p>