darul75 / angular-awesome-slider

:arrows_clockwise: Angular slider control directive
http://darul75.github.io/angular-awesome-slider/
MIT License
144 stars 63 forks source link

Critical bug: new jQuery plugin created *EVERY* time ngModel changes. #17

Closed lewang closed 10 years ago

lewang commented 10 years ago

The design seems to be to create a new jQuery plugin every time ngModel changes:

https://github.com/darul75/ng-slider/blob/1b14a171217df22a4e857fe1449b71077cc5ac4e/src/ng-slider.js#L53

It may look functional but it causes everything on the page to slow down as more changes are made to ngModel. For example if you log some events on Draggable, you'll see many new draggables are created very quickly and many duplicate events triggered as you interact with the slider.

darul75 commented 10 years ago

yes you are right, I check what I can do