99
rated 0 times
[
105]
[
6]
/ answers: 1 / hits: 17032
/ 11 Years ago, fri, december 20, 2013, 12:00:00
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>
More From » forms