How to submit current form in ng-repeat angularjs -


i need not able access $scope.mainform.subform.submitted property in script. html goes below.

<div ng-form="mainform">      <div ng-repeat="dependent in dependentdetails">          <ng-form name="subform">              <input type="text" class="textbox" ng-model="dependent.firstname"/>                                    @*same goes other personal details*@                                    <input type="button" id="submitbutton"  value="save"  ng-model="submit" ng-click="savedependentdetailsclick($event, $index, dependent)" />          </ng-form>      </div>  </div>

can help?

first of all, think it's not correct use <ng-form name="subform">...</div> in ng-repeat in way have used because end multiple forms having same name(subform) within same scope therefore can't refer each of these forms have not unique name providing reference them. end multiple submit buttons same id="submitbutton" in same html document invalid html.


Comments

Popular posts from this blog

PySide and Qt Properties: Connecting signals from Python to QML -

c# - DevExpress.Wpf.Grid.InfiniteGridSizeException was unhandled -

scala - 'wrong top statement declaration' when using slick in IntelliJ -