<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中不同控制器中這兩種形式的狀態?