Quantcast
Channel: Ionic Forum - Latest topics
Viewing all articles
Browse latest Browse all 70442

Preload components, page opens with delay after first click

$
0
0

@Corbis wrote:

I am using ionic v4 and lazy loading in my app like

@NgModule({
    imports: [
        RouterModule.forRoot(routes, {
            useHash: false,
            preloadingStrategy: PreloadAllModules,
        })
    ],
    exports: [RouterModule]
})
export class AppRoutingModule {
}

but pages which use ionic elements take some time to show when I click the button for the first time. Repeat clicks show pages much faster.

Here is “Followers” page network tab screenshot after the first click:

Here is “Followers” page network tab screenshot after the second click:

Also inserting video example maybe it would be more clear what is the problem:

As you see clicking the page second time doesn’t load any js chunks and page opens instantly. So my question is how to preload those js chunks so I can improve user experience when they open my app pages for the first time?

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 70442

Trending Articles



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