Manually load lazy loaded page / module in Ionic 3

I have implemented Ionic 3 lazy loading, so I am very pleased that my application does not need to load everything to view the first page, but now I am left with a slight delay (in a web application this means you are loading ~ 15-20KB.js) the first time you access the page.

What I would like to do is load the "next page" in the background after the current page has loaded. Most of the time, he knew which page was "next", either because it was the "successful" page you are on, the next step in the sequence, or a detailed page of items in a list, and so on.

Essentially I want to do something like what the NavController does on push / insert / setRoot, etc. with a string, but doesn't actually do any nav. There IonicPageModule.forChild()

, but it doesn't accept a string.

I saw that I can use preloading modules, but it doesn't really provide much control over the order beyond priority, and doesn't scale very much for a larger application, so I want to rather manage this and add some code to each page to load next possible page / s.

+3


source to share





All Articles