Skip to content

An Angular directive for nested forms that prevents $invalid from propagating

License

Notifications You must be signed in to change notification settings

momega/isolate-form

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

isolate-form

An Angular directive for nested forms that prevents $invalid from propagating, allowing a nested form to be invalid without affecting its parent's validity.

Code originally written by 91K00, as seen here and here.

The original code does not work for AngularJS >=1.6.2. So it did modification based on the latest comments here

Usage:

 <form name="parent">
    <input type="text" ng-model="outside"/>
    <ng-form name="subform" isolate-form>
        <input type="text" ng-model="inside"/>
    </ng-form>
</form>
 

Example: https://codepen.io/MOmega/pen/eeePPW

About

An Angular directive for nested forms that prevents $invalid from propagating

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 100.0%