-
Notifications
You must be signed in to change notification settings - Fork 114
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
switch-change should only fire if the switch itself changed the value #111
Comments
In the plunkr you can compare the behavior between the checkbox and the switch itself. |
According to the documentation, " You may want to read the discussion here. |
I can't believe I missed the fact that ng-change works on this... !! For some reason I read switch-change as your implementation of ng-change and that I was to use that instead of ng-change. Thanks for your quick reply and feedback. |
Yeah, I was like @Deklin . I thought that ng-change & switch-change doing same thing. How stupid. |
@tucq88 I will gladly accept PRs. |
Here is a plunkr showing the issue.
http://plnkr.co/edit/NYLyEUBz2fs3XFCKtCjS?p=preview
Basically lets compare ng-change to switch-change
ng-change only fires if the directive/controller managing the model makes the change, an outside change will not fire this
switch-change will fire if the model is changed even outside the angular-bootstrap-switch codebase.
The text was updated successfully, but these errors were encountered: