Ion-Slides resize() doesn't work


#1

Hello Guys,

I have a simple ion-slides element, which works quite good so far.
My only problem is, when i change the device orientation, because it doesn’t resize the slide element’s wide.

html:

<ion-slides #slides>

  <ion-slide>
    <h2>Slide 1</h2>
  </ion-slide>

  <ion-slide>
    <h2>Slide 2</h2>
  </ion-slide>

  <ion-slide>
    <h2>Slide 3</h2>
  </ion-slide>

</ion-slides>

.ts-file:

export class DetailviewPage {
  @ViewChild(Slides) slides: Slides;
.
.
.
ionViewWillEnter() {
    this.screenOrientation.onChange().subscribe(() => {
      this.slides.resize();
    });
.
.
.

other functions like slideNext() work perfectly.

Any ideas what I might be doing wrong?
Thank you


#2

Am I maybe undestanding the .resize() function a Little bit wrong?
What should it do exactly? My expacted behavior or sth else?