각도가 천천히 진행됩니다. 이 시점에서 나는 각 단계를 포함하고 있기 때문에 버튼 및 일반 헤더 나는 그래서 그런 식으로 내가 같은 반복하고 있지 않다 루프를각도 동적 생성 양식 유효성 검사
<section ng-from="form12.{{step.id}}" ng-repeat="step in steps" id="{{step.id}}" ng-class="{active: currentSection == $index}">
<h1 class="header">{{$index + 1}}. {{step.title}}</h1>
<div class="content">
<ng-include src="step.template"></ng-include>
</div>
<!--and button code-->
<div class="content-body" ng-show="currentSection == $index">
<button ng-show="$index != 0" class="btn prev" ng-click="prevSection()">Previous</button>
<button class="btn next" ng-click="nextSection()" ng-disabled="step{{$index+1}}.$invalid">{{isLastStep($index)}}</button>
<div style="clear: both;"> </div>
</div>
</section>
을 다음있다 "계속", 각 단계는 NG-형태로 구성되어, 여러 단계로 양식을 가지고 버튼은 각 ng-form에 대한 코드입니다.
ng-include를 사용하기 전에 섹션을 하드 코딩 했으므로 이제 ng-include가 ng-repeat를 생성하므로 $ scope가 누락되었다고 가정합니다. 어떻게 작성해야합니까? 각각의 ng-form 검증 결과에 따라 계속 버튼을 사용할 수 있습니까? (어떻게 내가 맨 위의 $ 범위에서 각 NG 형태의 결과를 액세스 할 수 있습니까?)
불행하게도 내가 철자 않았다 그것을 잘못, 주어진 예는 잘 작동 – Raimonds