Reputation: 3061
What can happen when a submit is done in nested forms?
Will it work if I write ??? - my html file which is angularjs like below:
<form>
<form>
</form>
<form>
</form>
</form>
</form>
Upvotes: 0
Views: 132
Reputation: 18193
You cannot nest forms in HTML, but in AngularJS we have ng-form which should do what you're looking for.
<form name="parentForm">
<div ng-form="childForm">
</div>
</form>
The parentForm
will be submitted, and both parentForm
and childForm
will be accessible from the $scope
associated with this view.
Upvotes: 1