Skip to content
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-switchery not updating ng-model value on toggle the switch in angular js #44

Open
JatinDudhat opened this issue Jul 30, 2018 · 1 comment

Comments

@JatinDudhat
Copy link

I have used the switch in angular js like <input type="checkbox" id="is_default" class="js-switch" ng-model="vm.is_default" ui-switch/>
It is updating the value if default value=0 and i change it to 1
It's not updating the model value when default value =1 and i change it to 0(it's not updating the value of vm.is_default)

@atefBB
Copy link
Contributor

atefBB commented Nov 8, 2018

Hey @JatinDudhat!
Did you try to add ng-true-value and ng-false-value attributes to checkbox? Or maybe using ng-value attribute?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants