This repository has been archived by the owner on Apr 12, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 27.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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: #5858
- Loading branch information
Gonzalo Ruiz de Villa
committed
Dec 1, 2014
1 parent
119ace4
commit 75c719a
Showing
2 changed files
with
158 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters