We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent a9be003 commit 0432915Copy full SHA for 0432915
src/ng/directive/form.js
@@ -117,6 +117,7 @@ function FormController(element, attrs) {
117
element.removeClass(PRISTINE_CLASS).addClass(DIRTY_CLASS);
118
form.$dirty = true;
119
form.$pristine = false;
120
+ parentForm.$setDirty();
121
};
122
123
}
test/ng/directive/formSpec.js
@@ -284,6 +284,9 @@ describe('form', function() {
284
inputB.$setValidity('MyError', true);
285
expect(parent.$error.MyError).toBe(false);
286
expect(child.$error.MyError).toBe(false);
287
+
288
+ child.$setDirty();
289
+ expect(parent.$dirty).toBeTruthy();
290
});
291
292
0 commit comments