I have a form that I am validating with Angular.js and I want to pragmatically set the dirty state on a child element of a form. However, the child element is in an isolated scope in a directive. How can I set that input element to ng-dirty from the parent scope?
Example code:
<form name="parentForm">
<!-- How can I validate an input element inside this directive-->
<childDirective required />
</form>
Example Child Directive:
<div>
<input type="text" ng-form name="childForm" required/>
</div>