Ionic 4 IonSlides bug? with screen orientation change


IonSlides does not properly update when the screen orientation changes. E.g. consider the following code snippet:

@ViewChild(IonSlides) slides: IonSlides;
constructor(private screenOrientation: ScreenOrientation){}
public ionViewWillEnter() {
public ngOnInit() {
      () => {

The update() method is called and works (solving a problem) for the ionViewWillEnter() hook. However while the update() method is called anytime a screen orientation changes (confirmed), it does not seem to have effect - the IonSlides displays incorrectly in this case. Any idea how to fix this? The IonSlides codebase has swiper as private so I can’t get to anything in there. BTW: confirmed on Samsung S9+ with the Dalvik debugger if that means anything.


I found the solution was rather to set some Swiper options, than to try and control the update of the Swiper:

slideOpts = {