-
Notifications
You must be signed in to change notification settings - Fork 66
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
ng-change get called without even change. #34
Comments
I have the same problem. :( |
Hi (sorry for the very late reply), could you please provide an example for this problem? I tried to proove it with the supplied test application and could not reproduce it. |
To reproduce it, just place an ng-change event on your directive and do a alert within ng-change. Then refresh page, when page get load you will see a alert. If it happens, issue is confirmed. ng-change should only called when there is a change. Let me know if you are able to regenerate it after it. |
Here is a simple example with ng-change, which does not trigger it on load: https://jsfiddle.net/83ncr2kr/3/ |
I have the exact same problem... |
Could you provide an example which shows the problem? |
yes: https://jsfiddle.net/544342zL/1/ |
The Problem is, that "a1", "a2", ... are no valid values for the checkbox. See here for a working version: https://jsfiddle.net/da2z3wgb/ |
i understand what you're saying.. |
See here: https://jsfiddle.net/hppg6sax/ |
The 0 and 1 values come as numeric, not string... |
I will look into it |
thx :) |
Hi All, anyone come up with a solution to this? The issue is because of invalid values into the model tied to? |
With default html input checkbox if there is ngChange directive placed, ngChange will not get called untill there is a change. But with your directive, it gets called automatically with the page loads for the first time without user interaction. This seems to me a bug as it is supposed to work exactly like html checkbox. I am having issue with it.
The text was updated successfully, but these errors were encountered: