In the code snippet above, there is an issue with the repeating checkboxes. The code generates checkboxes based on the data provided to filter a table, but sometimes it results in multiple checkboxes with the same label '123'. How can I modify the code to display only one checkbox for each unique input?
For example, the current code creates two checkboxes labeled '123', but I want to have just one checkbox for each distinct value.
<div class="row">
<label data-ng-repeat="x in projects">
<input
type="checkbox"
data-ng-true-value="{{x.b}}"
data-ng-false-value=""
ng-model="quer[queryBy]" />
{{x.b}}
</label>
</div>
Below is some context in which the issue occurs:
$scope.projects = [
{
a : "G",
b : "123",
c : "S1",
},
{
a : "R",
b : "456",
c : "S2",
},
{
a : "G",
b : "123",
c : "S3",
},
];