My JSON Array named employee:
[{"id":15,"userId":"Vikram.Swaminathan@gmail.com","fromDate":"2016-01-05","toDate":"2016-01-14","typeofLeave":"Sick Leave","region":"IND","status":"Accepted","daysapplied":8}
{"id":16,"userId":"Vikram.Swaminathan@gmail.com","fromDate":"2016-01-13","toDate":"2016-01-13","typeofLeave":"Paternity Leave","region":"IND","status":"Accepted","daysapplied":1}
In my Html:
<select>
<option> ng-repeat="email in employee" {{email.userId}} </option>
</select>
My Dropdown should display only one time basically how many times i applied leaves it should display Vikram.Swaminathan@gmail.com in dropdown only once
<select>
<option ng-repeat="email in employee | unique:'userId' ">{{email.userId}}</option>
</select>
I don't know how to use unique in angularJS how to include ? When i include i get error as Error: $injector:unpr Unknown Provider