title: ng-form and ng-submit in a ng-repeat
body: <p>I have been trying to get a nested form to validate properly and then call a function on my controller when the submit button is clicked. I have tried remove all buttons except the submit button and it does not work. The only thing that I have been able to get to work is Ng-click on the button but I need validation and this method did not allow validation to fire.</p>
  
  <p>Here is the method in the Controller and HTML which works if called via a ng-click
  <div class="snippet" data-lang="js" data-hide="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code> saveRow(row: ControlDetailDTO) {
              row.FiscalYearValues.forEach(value =&gt; {
                  value.ActualValue = value.PreviousYear + value.DeltaValue;
              });
              
              this.controlsDataContext.saveDetail(row).then((results) =&gt; {
  
                  console.log(results);
                  row.editMode = false;
  
              }).catch((err) =&gt; {
                      this.$scope.error = err.data.ExceptionMessage;
                  });
          }</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;table class="table table-striped table-responsive"&gt;
  
                  &lt;tr ng-repeat-start="control in newControl.ControlDetails" class="headerLightBlue" ng-show="$first" ng-form="edit"&gt;
                      &lt;th colspan="2"&gt;Category&lt;/th&gt;
                      &lt;th&gt;Description&lt;/th&gt;
                      &lt;th&gt;{{control.FiscalYearValues[0].FiscalYear.FiscalYearName }}&lt;/th&gt;
                      &lt;th&gt;{{control.FiscalYearValues[1].FiscalYear.FiscalYearName }}&lt;/th&gt;
                      &lt;th&gt;{{control.FiscalYearValues[2].FiscalYear.FiscalYearName }}&lt;/th&gt;
                      &lt;th&gt;{{control.FiscalYearValues[3].FiscalYear.FiscalYearName }}&lt;/th&gt;
                      &lt;th&gt;{{control.FiscalYearValues[4].FiscalYear.FiscalYearName }}&lt;/th&gt;
                      &lt;th&gt;{{control.FiscalYearValues[5].FiscalYear.FiscalYearName }}&lt;/th&gt;
                      &lt;th&gt;&lt;/th&gt;
                  &lt;tr&gt;
                      &lt;ng-form name="edit" ng-submit="saveRow(control)" novalidate&gt;
                          &lt;td ng-show="control.editMode" colspan="2"&gt;&lt;select name="Category" class="form-control" id="Category" required ng-model="control.Category" ng-options="category.CategoryName for category in categories track by category.Id"&gt;&lt;option value=""&gt;Select Appropriation&lt;/option&gt;&lt;/select&gt;&lt;/td&gt;
                          &lt;td ng-show="!control.editMode" colspan="2"&gt;{{control.Category.CategoryName}}&lt;/td&gt;
  
                          &lt;td ng-show="!control.editMode"&gt;{{control.Description}}&lt;/td&gt;
                          &lt;td ng-show="!control.editMode" ng-style="common.setColorCurrency(control.FiscalYearValues[0].DeltaValue)"&gt;{{control.FiscalYearValues[0].DeltaValue | inThousands | currency : $ : 0}}&lt;/td&gt;
                          &lt;td ng-show="!control.editMode" ng-style="common.setColorCurrency(control.FiscalYearValues[1].DeltaValue)"&gt;{{control.FiscalYearValues[1].DeltaValue | inThousands | currency : $ : 0}}&lt;/td&gt;
                          &lt;td ng-show="!control.editMode" ng-style="common.setColorCurrency(control.FiscalYearValues[2].DeltaValue)"&gt;{{control.FiscalYearValues[2].DeltaValue | inThousands | currency : $ : 0}}&lt;/td&gt;
                          &lt;td ng-show="!control.editMode" ng-style="common.setColorCurrency(control.FiscalYearValues[3].DeltaValue)"&gt;{{control.FiscalYearValues[3].DeltaValue | inThousands | currency : $ : 0}}&lt;/td&gt;
                          &lt;td ng-show="!control.editMode" ng-style="common.setColorCurrency(control.FiscalYearValues[4].DeltaValue)"&gt;{{control.FiscalYearValues[4].DeltaValue | inThousands | currency : $ : 0}}&lt;/td&gt;
                          &lt;td ng-show="!control.editMode" ng-style="common.setColorCurrency(control.FiscalYearValues[5].DeltaValue)"&gt;{{control.FiscalYearValues[5].DeltaValue | inThousands | currency : $ : 0}}&lt;/td&gt;
  
                          &lt;td ng-show="control.editMode"&gt;&lt;input name="Description" class="form-control input-md" id="Description" required="" type="text" placeholder="" ng-model="control.Description"&gt;&lt;/td&gt;
                          &lt;td ng-show="control.editMode" ng-style="common.setColorCurrency(control.FiscalYearValues[0].DeltaValue)"&gt;&lt;input name="FY0" class="form-control input-md" id="FY0" required="" type="number" placeholder="" required ng-model="control.FiscalYearValues[0].DeltaValue"&gt;&lt;/td&gt;
                          &lt;td ng-show="control.editMode" ng-style="common.setColorCurrency(control.FiscalYearValues[1].DeltaValue)"&gt;&lt;input name="FY1" class="form-control input-md" id="FY1" required="" type="number" placeholder="" required ng-model="control.FiscalYearValues[1].DeltaValue"&gt;&lt;/td&gt;
                          &lt;td ng-show="control.editMode" ng-style="common.setColorCurrency(control.FiscalYearValues[2].DeltaValue)"&gt;&lt;input name="FY2" class="form-control input-md" id="FY2" required="" type="number" placeholder="" required ng-model="control.FiscalYearValues[2].DeltaValue"&gt;&lt;/td&gt;
                          &lt;td ng-show="control.editMode" ng-style="common.setColorCurrency(control.FiscalYearValues[3].DeltaValue)"&gt;&lt;input name="FY3" class="form-control input-md" id="FY3" required="" type="number" placeholder="" required ng-model="control.FiscalYearValues[3].DeltaValue"&gt;&lt;/td&gt;
                          &lt;td ng-show="control.editMode" ng-style="common.setColorCurrency(control.FiscalYearValues[4].DeltaValue)"&gt;&lt;input name="FY4" class="form-control input-md" id="FY4" required="" type="number" placeholder="" required ng-model="control.FiscalYearValues[4].DeltaValue"&gt;&lt;/td&gt;
                          &lt;td ng-show="control.editMode" ng-style="common.setColorCurrency(control.FiscalYearValues[5].DeltaValue)"&gt;&lt;input name="FY5" class="form-control input-md" id="FY5" required="" type="number" placeholder="" required ng-model="control.FiscalYearValues[5].DeltaValue"&gt;&lt;/td&gt;
  
  
                          &lt;td ng-show="!control.editMode"&gt;&lt;button name="button3id" ng-show="control.isEditable &amp;&amp; $last" class="btn btn-success" ng-click="editRow(control)" id="button3id" popover-trigger="mouseenter" popover="Edit"&gt;&lt;i class="fa fa-edit"&gt;&lt;/i&gt;&lt;/button&gt;&lt;/td&gt;
                          &lt;td ng-show="control.editMode" width="100px"&gt;&lt;button name="button3id" class="btn btn-danger" ng-click="cancelEdit(control)" id="button3id" popover-trigger="mouseenter" popover="Cancel Changes"&gt;&lt;i class="fa fa-undo"&gt;&lt;/i&gt;&lt;/button&gt;&amp;nbsp;&lt;button type="submit" class="btn btn-success" id="saveRow" popover-trigger="mouseenter" popover="Save Changes"&gt;&lt;i class="fa fa-save"&gt;&lt;/i&gt;&lt;/button&gt;&lt;/td&gt;
  
  
                      &lt;/ng-form&gt;
  
                  &lt;/tr&gt;
  &lt;table&gt;</code></pre>
  </div>
  </div>
  </p>