-
Notifications
You must be signed in to change notification settings - Fork 172
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Form dirty with when mask loads with divisors #30
Comments
+1 |
Tried updating the controller inside the post function but that does not update the parent form controller. Found this: http://stackoverflow.com/questions/19320062/accessing-parent-directives-controller-recursively-in-angularjs. It lets me update the parent form and set it to pristine but i'm not sure where to place such code so that the form is pristine only when the directive first renders the form. Thoughts? |
Okay, my thinking was along similar lines to what @ldeavila is suggesting. Tag on some variable that would track if we're doing the initial $setViewValue call or not. If so, I was going to set pristine to true, then climb up to the form So the pertinent snippet, inside parseViewValue, where we "Update view and model values":
It appears to be working for me. Now I'm really bothered by not understanding why it is working. Why doesn't this code dirty up the form on initial load, but consecutive @candreoliveira, what are your thoughts on this approach? |
+1 |
http://plnkr.co/edit/Ahlzf0TXhcnNtlM45OQA?p=preview
The text was updated successfully, but these errors were encountered: