benjamincharity / angular-flickity

👆 An AngularJS wrapper for Flickity (Touch, responsive, flickable carousels)
Other
33 stars 22 forks source link

Next/Previous buttons not disabled on initialization when there are not enough slides #80

Open nhardy opened 7 years ago

nhardy commented 7 years ago

It looks like the bc-flickity-previous and bc-flickity-next directives do not initialize as disabled, even if there are not enough slides to scroll. It looks like the functions defined here: https://github.com/benjamincharity/angular-flickity/blob/master/src/previous/previous.directive.js#L71 and here: https://github.com/benjamincharity/angular-flickity/blob/master/src/next/next.directive.js#L73 need to be called when Flickity is initialized.

benjamincharity commented 7 years ago

Good catch @nhardy. I don't currently have much bandwidth to work on this, but will try to get to it soon(ish). As always, PRs are welcome!