<div ng-app="myApp">
<div ng-controller="firstController">
<form name=form1>
//there are some required fields here
<input type="button" ng-click="submit1(form1)"/>
</form>
</div>
<div ng-controller="secondController">
<form name=form2>
// there are some required fields here
<input type="button" ng-click="submit2(form2)"/>
//I can check the status in controller by "$scope.form2.$valid" here
</form>
</div>
<div ng-controller="checkStatus">
<input type="button" ng-click="submit3(form1,form2)"/>
//how can i check here
</div>
</div>
正如上面的代码,我有不同的控制器和不同的形式与它相关联。有一个部分,我需要检查所有表格状态 因为我是新的角js可以帮助我的任何人,如何解决这个问题。任何帮助,可能会感激。我有两种形式和两个控制器,现在我想检查角度js中不同控制器中这两种形式的状态?