0

I am creating a dynamic radio buttons and checkboxes .But when enter their labels how can we have a validation so that no name is repeated again for next controls respectively

<span style="padding-left: 20px" ng-repeat="r in field.rbtn track by $index | unique:'r.radioname'" >
    <input type="radio"  id="radio_{{$index}}">{{r.radioname}}
</span>

For this I have used like this..but it does not displaying the values only the label is displayed but under it ,no radio button with its name is not displaying

Vindya Veer
  • 139
  • 1
  • 3
  • 15

1 Answers1

0

I am sure you are using ng-repeat for dynamically generating checkboxes.

You can use the Angular unique filter for removing duplicates in your ng-repeat.

kensplanet
  • 493
  • 8
  • 15