Skip to content
This repository has been archived by the owner on Dec 3, 2021. It is now read-only.

Use animation only when user clicks #56

Open
dlwhiteman opened this issue Jan 24, 2015 · 4 comments
Open

Use animation only when user clicks #56

dlwhiteman opened this issue Jan 24, 2015 · 4 comments
Labels

Comments

@dlwhiteman
Copy link

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?

@cgarvis
Copy link
Owner

cgarvis commented Feb 12, 2015

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 cgarvis added the bug label May 6, 2015
@panzerdp
Copy link

Faced the same problem. Any solutions?
Thanks.

@mlandry360
Copy link

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.

@jitendersandhu
Copy link

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.

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

No branches or pull requests

5 participants