Using angualrjs 1.3
I have a dropdown inside my ng-repeat as:
<tr ng-repeat="c in myData">
<td>
<select name="type" class="form-control" ng-model="c.type" required>
<option value="">--Select--</option>
<option ng-repeat="type in types">{{type.text}}</option>
</select>
</td>
</tr>
How can i do required field validation of above dropdown.
I have other textbox controls in my ng-repeat where I used as below:
<td ng-class="{ 'has-error': myForm['comment_' + {{$index}}].$invalid && (myForm['comment__' + {{$index}}].$touched || myForm.$submitted) }">
<input type="text" name="comment_{{$index}}" required ng-model="c.comment" class="form-control" />
</td>
And the validation works, but when I try to apply same to the dropdown it does not work.
Any inputs ?