angular-toggle-switch icon indicating copy to clipboard operation
angular-toggle-switch copied to clipboard

Use animation only when user clicks

Open dlwhiteman opened this issue 10 years ago • 4 comments

I am using the angular-toggle-switch in my application in a settings dialog. The user can select from a menu to go between panels. I have noticed that when a panel is shown with the toggle switch on it, and the initial value in ng-model is false, the toggle switch animates from on to off. Is it possible to make it so that it shows the "off" value without animation when it's a model change, and with animation when the user clicks to change it?

dlwhiteman avatar Jan 24 '15 00:01 dlwhiteman

Animation is handle via classes. It has to start somewhere before the switch-off and switch-on classes are applied. Not sure of a solution.

cgarvis avatar Feb 12 '15 16:02 cgarvis

Faced the same problem. Any solutions? Thanks.

panzerdp avatar Oct 21 '15 15:10 panzerdp

Same problem here. On template load, the switch animate to current model state. Would be nice to only animate on click event not on init.

mlandry360 avatar Dec 15 '15 16:12 mlandry360

I am also facing the same problem. I am using the switch in a form and the initial value is false and the switch animates on initialization. Would be nice if it only animates once the user clicks on it.

jitendersandhu avatar Apr 29 '16 23:04 jitendersandhu