Advertisement
Guest User

Untitled

a guest
Apr 24th, 2014
42
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.81 KB | None | 0 0
  1. <!-- Creates a `parentForm` property in the current scope -->
  2. <!-- that will give access to child control-elements -->
  3. <div ng-form name="parentForm">
  4. <!-- Creates a child control-element, whose properties -->
  5. <!-- will be accessible under `parentForm.childControl` -->
  6. <input type="text" name="childControl" ng-model="someModel" />
  7.  
  8. <!-- Uses the various properties of the child control-element -->
  9. <!-- available to the parent from-element (through the FormController) -->
  10. <div>
  11. Child control-element info:<br />
  12. pristine: {{parentForm.childControl.$pristine}}<br />
  13. dirty: {{parentForm.childControl.$dirty}} <br />
  14. valid: {{parentForm.childControl.$valid}} <br />
  15. invalid: {{parentForm.childControl.$invalid}} <br />
  16. </div>
  17. </div>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement