如何在ng repeat angularjs中提交当前表单

如何在ng repeat angularjs中提交当前表单,angularjs,angularjs-ng-repeat,nested-forms,Angularjs,Angularjs Ng Repeat,Nested Forms,我需要无法访问脚本中的$scope.mainform.subform.submitted属性。我的html如下所示 @*其他个人信息也是如此*@ 试试这个 var-app=angular .module('MyApp'[ ]) .controller('Main',['$scope',函数($scope){ $scope.DependentDetails=[{“FirstName”:“},{“FirstName”:“}]; $scope.saveDependentDetails单击=函数(

我需要无法访问脚本中的$scope.mainform.subform.submitted属性。我的html如下所示


@*其他个人信息也是如此*@
试试这个

var-app=angular
.module('MyApp'[
])
.controller('Main',['$scope',函数($scope){
$scope.DependentDetails=[{“FirstName”:“},{“FirstName”:“}];
$scope.saveDependentDetails单击=函数(DependentDetails){
控制台日志(依赖的详细信息);
}
}])

首先,我认为在
ng repeat
中使用
..
的方式是不正确的,因为您将得到多个具有相同名称的表单(
子表单
)因此,在同一范围内,您不能引用这些表单中的每一个,因为它们没有唯一的名称提供给您对它们的引用。
您还将在同一个html文档中使用多个提交按钮,这些按钮具有相同的
id=“submitbutton”
,这是一个无效的html。

但我需要在每个相关详细信息的末尾显示提交按钮,当用户单击“保存”时,我需要访问特定表单的Submited属性。当我调试时,它会显示其他属性,如valid、pristine等,但“submitted”是可见的。