Maslow
Maslow

Reputation: 1104

Ionic 2: How can I force cache pages?

I love how the cached pages are fast in Ionic 2, but the first load is always slow. Is there a way I could force cache creation of a page (for example during the Splash, before the platform ready, etc) ?

Thanks a lot

Upvotes: 1

Views: 2109

Answers (1)

LeRoy
LeRoy

Reputation: 4436

you cant preload a page before it has already been created. What you can do is preload data from the app.componant.ts page like here

Then push your data on viewWillEnter

viewWillEnter(){

}

Upvotes: 2

Related Questions