We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0b0c25c commit 40fafb2Copy full SHA for 40fafb2
src/checkbox/checkbox.js
@@ -59,15 +59,17 @@ angular.module('angularify.semantic.checkbox', [])
59
// Click handler
60
//
61
element.bind('click', function () {
62
- if (scope.checked == true){
63
- scope.checked = true;
64
- scope.model = false;
65
- element.children()[0].removeAttribute('checked');
66
- } else {
67
68
- scope.model = true;
69
- element.children()[0].setAttribute('checked', 'true');
70
- }
+ scope.$apply(function() {
+ if (scope.checked == true){
+ scope.checked = true;
+ scope.model = false;
+ element.children()[0].removeAttribute('checked');
+ } else {
+ scope.model = true;
+ element.children()[0].setAttribute('checked', 'true');
71
+ }
72
+ })
73
});
74
75
0 commit comments