How to us ion slides update() function

I am generating ion-slides asynchronously. However I believe I need to use update() function.

Below is the api section: https://ionicframework.com/docs/api/components/slides/Slides/#update

I am not sure how to use this function.

Could someone show me how to use this function?

Any help on this? An example of how to user update() will be much appreciated.

This is an old post, but here’s what we do to force the update when the screen is rotated…

  @HostListener('window:resize')
  onResize() {
    setTimeout(() => this.slider.update(), 100);
  }

Yes, this is my code to auto adapta the cant of element to view fo screen.

@HostListener('window:resize', ['$event'])
  onResize(event) {
    this.disp()
  }

  ngOnInit() {
    this.disp()
  }

  async disp() {
    let value = 0
    if (this.plt.width() >= 668) {
      let por = await Number(this.plt.width()) - (Number(this.plt.width()) * 0.2)
      value = await por * 0.01068 // this is my % de px * width screen. if device is iphone 6 show 4 item, you can play whit this values
    } else {
      value = await Number(this.plt.width()) * 0.01068
    }
    this.slideOpts = {
      slidesPerView: value,
      freeMode: true,
      coverflowEffect: {
        rotate: 50,
        stretch: 0,
        depth: 100,
        modifier: 1,
        slideShadows: true,
      }
    }
  }