Closed driesdl closed 4 years ago
That's odd, it used to work, however reflecting on this now it's probably good it doesn't. Setting this violates data down actions up.
Are you instead able to extend this addon's Swiper component and tap into _swiper
to trigger the custom slide behavior you need?
I haven't tried tapping into _swiper
, instead I used currentSlide
to navigate through it. I'll have to test it out first with _swiper
.
Thanks for the help sir.
edit: using _swiper works as well! That will be quite usefull or is that considered a bad practice? @Matt-Jensen
this.get('assetSwiper._swiper').slideNext(500, true);
Glad to hear it! I wouldn't consider using _swiper
a bad practice all. When you need some custom functionality this addon doesn't give you, extending the component is the right choice.
We should probably update the documentation to remove _registerAs
and recommend the approach you took.
Are methods like 'slideNext()' and 'slidePrev()' not supported in ember-cli-swiper?
I registered the swiper on the template like
registerAs=assetSwiper
, but calling methods like the ones above throw errors.this.get('assetSwiper').slideNext(500, false);
Or do you have to use 'currentSlide' to change the slide?