Quantcast
Channel: Ionic Framework - Ionic Forum
Viewing all articles
Browse latest Browse all 49384

Ionic v5 - Is it posible to cache/reuse Modal for multiple uses?

$
0
0

Scenario:

we have a list of items, when i click one of them, the modal is opened to show the details of the item.

Issue:

On slow phones there is a delay (about 2-3 seconds) between the click and the modal actually being shown.

How to reproduce:

  1. go to: https://ionicframework.com/docs/api/modal
  2. open the chrome developer tools (F12)
  3. clic on the “Performance” tab.
  4. set the CPU throttling to “4x slowdown” or “6x slowndown”.

image

  1. Clic on the “Show Modal” of the page (open and close several times, every time will be a delay)

image

So my question is. Is there any way to avoid the modal to be created and destroyed every time? Since i know that it will be used multiple time with the same template (component), can i cached it to be reused and save the time that takes create it again and again?

Thanks!

1 post - 1 participant

Read full topic


Viewing all articles
Browse latest Browse all 49384

Trending Articles



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