Closed bsiddiqui closed 9 years ago
This is the downside of coupling validation to presentation via templates instead of data via code (:cry: Angular). The only way I know of for doing something like this would be to create a wrapper directive for the inputs that would take the ngModel
and then create the inputs.
If the the object that is being repeated is empty, angular doesn't display the inputs, allowing the form to invalid. I saw this discussion about using
ng-form
but it doesn't seem to work either if theng-repeat
isn't displayed.http://stackoverflow.com/questions/12044277/how-to-validate-inputs-dynamically-created-using-ng-repeat-ng-show-angular