Prefetch templates

Is there a way to prefetch templates in Ionic 2?

Right now my pages render a little slowly the first time, but are fast the second time around (because they’re cached at that point).

I’d like to prefetch / cache them when the app starts up so they’re fast the first time as well if possible?

Hi there !

I’m also struggling in prefetching / force caching views.
I wonder if this article about Angular-TemplateCache can be applied on an Ionic2 project :

Maybe there is a built-in way to do this ! Please help us guys :wink:

This gets the job done for the first page in a tab:

<ion-tabs preloadTabs="true">

But the question remains, how can I do this for any page of my choosing in an app?

@iignatov can we please get an update on this one :slight_smile: ? Basically opening a page with nav.push() the first time has about a second to 2s delay. Second time around, it’s fast.

Thank you !

@tonyawad88 It seems to be in the works, you could subscribe/vote for the issue:


@iignatov Thank you !