ngOnInit is not invoked when tab is clicked

I have a tabs app. When I click on a tab, is does not invoked the ngOnInit on the page associated with that tab.

I think this relates to:

but I don’t understand how to implement the fix in that post.

Please help.

are you use ionViewWillEnter?

Good question given I only mentioned ngOnInit. ionViewWillEnter does not get invoked either.

Update to my previous reply: I just created a fresh tabs app from ionic and ionViewWillEnter does get invoked. I’m not sure what is wrong with my app. It’s very simple and I only created it a couple weeks ago.

I’ll investigate on my own and follow up if I can resolve it.

ionViewWillEnter does work. Thank you @YAsh0011!

1 Like

ionViewWillLeave sometimes triggers after my template. I need ngOnInit