slideTo updates the paging but not the slide

Hi everyone!

My issue here is that when I try to slide the slider to the particular slide, then it shows the first slide while the pagination adds an active state to the correct slide.

The code:

ionViewWillEnter() {
        // get all drinks
        this._drinksProvider.getAllDrinks().subscribe(
            data => { 
                return this.allDrinks = data;
            },
            err => { console.log(err);}
        );

        switch(this.familyIndex) {
            case 0:
                this.initialSlide = 0;
                break;
            case 1:
                this.initialSlide = 6;
                break;
            case 2:
                this.initialSlide = 9;
                break;
            case 3:
                this.initialSlide = 13;
                break;
            default:
                this.initialSlide = 0;
        }

        this.sliderMain.slideTo(this.initialSlide);
    }

Please help 8)