Google News
logo
Ionic - Interview Questions
What is Lazy Loading in Ionic?
Lazy loading is a general process where we load that thing whenever we need them. The main idea behind this concept is that we do not need to load every page in the application when the application is launched. In the previous versions of Ionic framework, it is recommended to use @IonicPage decorator to lazy load your pages, but now in the latest version of Ionic (Ionic 4), we lazy load our Angular components with Angular routing.
 
We know that every Ionic component is a web component, and these components will be lazily loaded only when they are accesses in the Ionic application. It means that the code for <ion-button> and <ion-tab> will only be loaded when they are accessed in the application.
Advertisement