Quantcast
Channel: Ionic Forum - Latest posts
Viewing all articles
Browse latest Browse all 230305

Slides with orientation change

$
0
0

If any one still having this issue I “solved” it like this:

TS:

ngOnInit() {
    this.platform.resize.subscribe( () => {
      this.handleSlideResize();
    });
  }
handleSlideResize() {
    this.hideSlides = true;
    setTimeout(() => {
      this.hideSlides = false;
    }, 10);
  }

HTML:

<ion-slides *ngIf="!hideSlides">

(Of course leave your options,reference… in the ion-slides)

Small timeout function. If you change the boolean too quick it wont work, you should at least have 1ms. I put 10 for testing.

Cheers!


Viewing all articles
Browse latest Browse all 230305

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>