angular-slick-carousel icon indicating copy to clipboard operation
angular-slick-carousel copied to clipboard

Toggling enabled/disabled state cause init to fire 2x + 2 number of times disabled.

Open draehal opened this issue 8 years ago • 0 comments

On first load, the init function is called twice. Each time the enabled state of carousel is toggled via slickSettings.enabled, init is called 2x more times. It appears that when disabled toggled to true, the listeners for init are not removed. When it is toggled to false, 2 new listeners are added for a total of 2x + 2 where x is the number of times toggled and 2 is the initial. (It should only be one)

Demo: http://embed.plnkr.co/GjGOTxC6Ub1JtBGVhd2x/

draehal avatar Oct 19 '16 18:10 draehal