You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(form): add support for ngFormOptions attribute and form isolation
Child forms propagate always their state to its parent form. Following the pattern of ngModelOptions
a new optional attribute is defined for forms, ngFormOptions that will allow to define now if the form
should be considered as 'root', therefore preventing the propagation of its state to its parent.
In the future, if more options are needed this new attribute ngFormOptions may be the place to define
them.
Options are exposed in the controller, but the isolated property is read only when the NgFormController
is executed, so the behavior won't change if its value is changed later.
It maybe used like this:
<ng:form name="parent">
<ng:form name="child" ng-form-options="{root:true}">
<input ng:model="modelA" name="inputA">
<input ng:model="modelB" name="inputB">
</ng:form>
</ng:form>
Closes: angular#5858
0 commit comments