I'm in search of a method to prevent the display of duplicate values when using ng-repeat with Angular JS.
Here is an example of my JSON list:
[
{
"Country":"Algeria",
"Value":"200"
},
{
"Country":"France",
"Value":"300"
},
{
"Country":"France",
"Value":"600"
},
]
Below is my JavaScript code for displaying countries:
<a class="item" href="#" ng-repeat="item in items">
{{ list.country }}
</a>
Is there a way to utilize ng-if or any conditional code to avoid showing duplicate items?
In this case, I would like to only display: Algeria and France.