kirstein / angular-autodisable

ngAutodisable directive for angular. Automatic disable for buttons rocks!
http://jsfiddle.net/kirstein/wXnks/embedded/result/
MIT License
63 stars 26 forks source link

need to config when to disable. #16

Closed hxlniada closed 9 years ago

hxlniada commented 9 years ago

when I submit a form in $modal(with animation: true), if I click very fast, the form will submit twice. Because when the promise is done, the disabled is set to false, but the animation is not completed, I can still submit the form if I click very fast. so, I want to config when to set disable to false. In this scenorio, I want just when the promise is success, I set the disable to fase.

mburgosh commented 9 years ago

The best approach would be to delay the promise resolution to when you are actually want it to be done.

hxlniada commented 9 years ago

@mburgosh ok