You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
My web app has tons of controller and JS stuff included. So checkbox always show false state. But when I give delay for initialization it works well.
functioninitializeSwitch(){$timeout(function(){// Remove any old switcherif(switcher){angular.element(switcher.switcher).remove();}// (re)create switcher to reflect latest state of the checkbox elementswitcher=new$window.Switchery(elem[0],options);varelement=switcher.element;element.checked=scope.initValue;if(attrs.disabled){switcher.disable();}switcher.setPosition(false);element.addEventListener('change',function(evt){scope.$apply(function(){ngModel.$setViewValue(element.checked);})});scope.$watch('initValue',function(newValue,oldValue){switcher.setPosition(false);});},200);// <-- changed value 0 to 200}
The text was updated successfully, but these errors were encountered:
My web app has tons of controller and JS stuff included. So checkbox always show false state. But when I give delay for initialization it works well.
The text was updated successfully, but these errors were encountered: