InterviewSolution
| 1. |
Explain Ionic lifecycle hooks |
|
Answer» Every component in Ionic has a lifecycle. Ionic creates, renders the component, checks it when its data-bound properties change and destroys it finally. Ionic offers lifecycle hooks that provide a way to tap into these key moments and trigger an action when they occur. Ionic 2 & 3 had these lifecycle events : ionViewDidLoad, ionViewWillEnter, ionViewDidEnter, ionViewWillLeave, ionViewDidLeave, ionViewWillUnload, ionViewCanEnter, ionViewCanLeave.
Allows you to control whether user can exit the view or not Ionic 4 provides the ANGULAR lifecycle hooks in addition to the above listed Ionic lifecycle hooks. All the angular lifecycle hooks are available.
|
|