I am using Slider, after update to RC5 the method getSlider for slider component return undefined, How I can fix this?
The documentation says “ion-slides, getSlider() has been removed. Please use the properties and methods on the instance of ion-slides instead.”, Which property can replace this?
Why I need it ?, I am using it to update the slider page content after the user slide left or right.
let swiper = slider.getSlider();
setTimeout(() => {
swiper.update();
swiper.init();
});
we’ll be adding more docs for this, but a majority of the properties are listed there.
Note that some of them will not be there, since they’re no long needed.
Like swiper.init has been removed since it is now a proper ng2 component.
I have tried slider.update(), it works well if the sliding direction is left to right, but when the sliding direction is right to left, the update does’t work.
My slider has initially one slide and I am setting loop=true.
here is the method which updates the slider on user slide right or left.
update(val) {
let slider = this.slider;
let month = this.moment();
month.month(this.months[0].month);
month.year(this.months[0].year);
month.add(val, 'month');