Ionic3 ion-slide don't go to next slide when trying second time

i have ion-slides in a modal that works fine : first i lock the slides until the user answer the question then click on next button i unlock the swipe to go to the next slide (question) etc… everything fine. when i close the modal when i’m still in the first slide or any slide , and back again open the modal the first slide appear normally but when the user click next the next slide didn’t appear until i resize the window or make landscape orientation or move from phone window to normal browser window. any one know what the problem .

ionic cli : 4.0.2 ionic-angular: 3.9.2 angular-core: 5.0.0

some of the code: maybe will help :

ngAfterViewInit() {
    this.assessSlides.autoHeight = true;
  }

  ngAfterContentInit() {
    this.assessSlides._rtl = true;
    this.correctAnswersCount = 0;
    this.assessSlides.lockSwipes(true);
  }


  moveToTheNextQuestion() {
    if (!this.assessSlides.isEnd()) {
      this.assessSlides.lockSwipes(false);
      this.assessSlides.slideNext();
      this.assessSlides.lockSwipes(true);
    }
  }

i find this solution:

ngAfterViewInit() {
    setTimeout(
      ()=>{
        if(this.assessSlides){
          this.assessSlides.update();
        }
      }
    );
  }