ksachdeva / angular-swiper

Angular directive for nolimits4web/Swiper
Apache License 2.0
197 stars 94 forks source link

cannot swipe to the newly created slides (after model changed) #41

Open nhim175 opened 8 years ago

nhim175 commented 8 years ago

Assuming that I'm using ng-repeat="photo in photos" to generate the slides.

After photos changed, the slider became buggy. (i.e. cannot swipe to the next slides)

belerweb commented 8 years ago

same too

belerweb commented 8 years ago

current, we can call update method after model changed to solve it. sample code as below:

            $timeout(function () {
                if (swiper) {
                    swiper.update(true);
                }
            }, 100);
nhim175 commented 8 years ago

@belerweb

            $timeout(function () {
                if (swiper) {
                    swiper.onResize();
                }
            });

This works too, no need to have 100

LB-DotFish commented 7 years ago

@nhim175 hi i use the method that you provide, but another problem occured.can you give me some help?thanks ReferenceError: swiper is not defined

LB-DotFish commented 7 years ago

@belerweb hi i use the method that you provide, but another problem occured.can you give me some help?thanks ReferenceError: swiper is not defined