如果我们在ngRepeat中使用验证器,那么它的工作正常 它在最后输入时执行验证.....它的解决方案是什么?
模块:https://github.com/huei90/angular-validation
参见示例: -
http://plnkr.co/edit/1PwcjDOyXuQBUEA8N6J7?p=preview
<div ng-controller="demoCtrl">
<form name="demoform">
<div class="input" ng-repeat="$i in list">
<input
type="text"
ng-model="list[$index].name"
name="field_{{$index}}" validator="required" />
</div>
<button validation-submit="demoform" ng-click="submit()" >Submit</button>
</form>
</div>