Skip to main content

Posts

Showing posts with the label Ionic4

Ionic Angular Page Life Cycle Methods

Page Life Cycle Methods: Page life cycle methods are like default method gets executed on navigate to the page. Major life cycle methods in the Ionic application are: ionViewWillEnter ionViewDidEnter ionViewWillLeave ionViewDidLeave Route Effects On Ionic Page State: In angular <router-outlet> prebuild component where any page will be displayed inside of it dynamically based on route configuration components. Ionic with angular we have route template like <ion-router-outlet> which is extended from <router-outlet>. On using <ion-router-outlet> ionic navigation work like :- In an ionic application when the user navigates to a new page, ionic will save or store the old page(old page exists within the DOM in the hidden state) and display the new page. Now if the user clicks on the old page link from the current page, ionic loads the old page from the storage(this means components will not be initialized freshly). It is like a cache for pe