Ion Slide not working unless page is refreshed


I am working on a ionic4 application that uses an array loop to generate content for ion-slides. Everything is okay till I try to use slideNext() or slideTo(index) to move to the next slide where it fails with no error and to get it to work I have to refresh the page with the slides.

Then when I try using swiping with the pager parameter set to true, the pager markers also do not appear until I refresh the page and when I do attempt to swipe, I can view the next slide but it slides back to the previous slide. Swiping also only works if I refresh the page. What could be the cause? I have tried downgrading from ionic5 to ionic4 with no success

The code I am using is:

  <ion-slides #quizSlider>
      <ion-slide *ngFor="let question of questions;let i = index">
            <ion-list lines="none">   
                    <ion-radio-group [(ngModel)]="singleanswer">
                      <ion-item *ngFor="let answer of question.answers">
                          <ion-radio slot="start" value="{{answer}}">
                <div fxLayout="row" fxLayoutAlign="center" >
                    <ion-button color="primary" (click)="checkUserAnswers(i)">Check</ion-button>

And the .ts is

  import { IonSlides } from '@ionic/angular';
  @ViewChild('quizSlider') quizSlider: IonSlides;
  export class Quiz {
  questions: Question[];
  constructor() {}
            if(this.questions.length == questionNo + 1)


                //let currentIndex = this.quizSlider.getActiveIndex().then( (val) => console.log(val) );
                //console.log('Current Slide: ' + currentIndex);
                //this.quizSlider.slideTo(questionNo + 1);