Cannot read property 'slideTo' of undefined TypeError: Cannot read property 'slideTo' of undefined code example

Example 1: Cannot read property 'slideTo' of undefined TypeError: Cannot read property 'slideTo' of undefined

@ViewChild('slides', { static: false }) slider: IonSlides;
// I faced a similar problem. Had to change static from true to false.

Example 2: Cannot read property 'slideTo' of undefined TypeError: Cannot read property 'slideTo' of undefined

@ViewChild('slides', { static: false }) slider: IonSlides;
// I faced a similar problem. Had to change static from true to false.

Tags:

Misc Example