Unlike standard HTML forms, AngularJS forms can be nested inside each other. Since form tags inside other form tags are invalid HTML, AngularJS provides the
ngForm directive for nesting forms.
Each form that provides a name will be added to its parent form, or directly to the scope if it has no parent form.
A nested form acts like a composite field that exposes its own validation information based on the fields that it contains. Such forms can be used to reuse as subforms by including them in container forms. Here we group two input boxes together to create a password and password confirmation widget:
<script type="text/ng-template" id="password-form"> <ng-form name="passwordForm"> ...