The below example code is not working in ionic 5. sliderRef object is undefined. I want move slide to programatically.
`@ViewChild('sliderRef', { static: true }) public sliderRef: IonSlides
this.sliderRef.slideTo(1)`
Can you post your html?
Thanks for the issue. Can you provide a repo with the code required to reproduce this issue?
same here!
Hi @liamdebeasi ,
Please check the sample code in the below repo URL
https://github.com/rajiramamoorthi/Test.git
The below method boreListSlider object is undefined.
ngOnInit(): void {
// this.boreListSlider object is undefined.
this.boreListSlider.slideTo(4);
}
Thank you
This is working now.
Thanks for the issue! This issue is being locked to prevent comments that are not relevant to the original issue. If this is still an issue with the latest version of Ionic, please create a new issue and ensure the template is fully filled out.
Most helpful comment
Hi @liamdebeasi ,
Please check the sample code in the below repo URL
https://github.com/rajiramamoorthi/Test.git
The below method boreListSlider object is undefined.
ngOnInit(): void { // this.boreListSlider object is undefined. this.boreListSlider.slideTo(4); }Thank you