Lifecycle events have been there in Ionic 1, and Native platforms also have a well structured lifecycle, which allows us to perform actions during various stages of navigation. There are six Page events and two Nav Guards available:
- ionViewDidLoad: When the page has loaded
- ionViewWillEnter: When the page is about to enter
- ionViewDidEnter: When the page is fully entered
- ionViewWillLeave: When the page is about to leave
- ionViewDidLeave: When the page has finished leaving
- ionViewWillUnload: When the page is about to be destroyed
- ionViewCanEnter: Runs before the view can enter
- ionViewCanLeave: Runs before the view can exit
ionViewCanEnter and ionViewCanLeaeve are two Nav Guards that help control views leaving ...