Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!-- Creates a `parentForm` property in the current scope -->
- <!-- that will give access to child control-elements -->
- <div ng-form name="parentForm">
- <!-- Creates a child control-element, whose properties -->
- <!-- will be accessible under `parentForm.childControl` -->
- <input type="text" name="childControl" ng-model="someModel" />
- <!-- Uses the various properties of the child control-element -->
- <!-- available to the parent from-element (through the FormController) -->
- <div>
- Child control-element info:<br />
- pristine: {{parentForm.childControl.$pristine}}<br />
- dirty: {{parentForm.childControl.$dirty}} <br />
- valid: {{parentForm.childControl.$valid}} <br />
- invalid: {{parentForm.childControl.$invalid}} <br />
- </div>
- </div>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement