You can use the ngForm
directive to wrap all elements (outer inputs and form).
According to the docs ngForm
is a "nestable alias of form directive. [...] It is useful to nest forms, for example if the validity of a sub-group of controls needs to be determined."
Furthermore, "the purpose of ngForm
is to group controls, but not to be a replacement for the <form>
tag with all of its capabilities (e.g. posting to the server, ...)".
<div ng-form="outerForm">
<div class="radio-group">
...
</div>
<form name="testForm">
<div class="radio-group">
...
</div>
<input type="submit" value="submit" ng-disabled="outerForm.$invalid" />
</form>
</div>