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