@Dovel wrote:
I have two pages, the home page with
ionViewDidEnter
(also triedionViewWillEnter
) and another page which will pushed with the NavigationController from the first page.
When I pushed the second page and close it again (navigate back) the eventionViewDidEnter
is not involked agains. It behaves likeionViewDidLoad
.
What should I do to have an event which will invoke if a page will enter and become the active page?This does not work (snippets):
// First page onButtonClick() { this.navCtrl.push(SecondPage); } // On second page navigate back to close the the page // Back on first page. ionViewDidEnter() { // Only called once on first enter. // Not called on navigation back from second page. }
I know why. The first page will not close on pushing another page. But it becomes inactive and active again on navigation back. In the documentation of this livecylce-event this should work. Becuase the first page becomes active again.
The only solution I currently have is using setRoot and implement back navigation manually.
Posts: 12
Participants: 2