ionic lifecycle 1

ionic lifecycle

ionViewWillEnter()	// Fired when the component routing to is about to animate into view.
ionViewDidEnter()	// Fired when the component routing to has finished animating.
ionViewWillLeave()	// Fired when the component routing from is about to animate.
ionViewDidLeave()	// Fired when the component routing to has finished animating.

Here is what the above code is Doing:
1. The constructor is called first.
2. The ionViewDidLoad() method is called next.
3. The ionViewWillEnter() method is called next.
4. The ionViewDidEnter() method is called next.
5. The ionViewWillLeave() method is called when the user navigates to a different page.
6. The ionViewDidLeave() method is called when the user navigates to a different page.
7. The ionViewWillUnload() method is called when the user navigates to a different page.

Similar Posts