Hi Douglas,

In every repeater you should create an new ngForm. You can nest forms as 
deep as you like.
try this:

        <form name="mainForm" id="mainForm" ng-submit="save(mainForm);">
            <ul>
                <li ng-repeat="item in list" ng-form="sendForm">
                    <div ng-repeat="x in item.fields">
                        <ng-form>
                            <div ng-if="x.type == 'text'">
                                <input placeholder="{{x.placeholder}}" 
ng-required='x.mandatory' type="{{x.type}}" name="{{x.name}}" id=
"{{x.name}}" ng-model="x.value">{{x.$error.required}} - OK
                            </div>
                            <div ng-if="x.type == 'textarea'">
                                <textarea placeholder="{{x.placeholder}}" 
ng-required='x.mandatory' type="{{x.type}}" name="{{x.name}}" id=
"{{x.name}}" ng-model="x.value"></textarea>
                            </div>
                        </ng-form>
                    </div>
                    <button type="button" ng-disabled="sendForm.$invalid" 
ng-click="submit(item)">Enviar</button>
                </li>
            </ul>
            <input type="submit" value="OK VALIDAR">
        </form>

        <pre>{{mainForm.$error|json}}</pre>

Does that help you?
Regards
Sander

-- 
You received this message because you are subscribed to the Google Groups 
"AngularJS" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.

Reply via email to