Lifecycle event for losing visiblity of page


#1

Hi,

Is there any lifecycle event if active page loses visibility but it was not left e.g. modal has been presented and covered the page. I tried ionViewWillLeave but it will only fire if page was left. If there is no lifecycle event, how can I solve it please ?

I’d appreciate any help
Best Regards


#2

What is it that you want to do? If you present a modal from a page, the page is always ‘left’.i.e the modal stacks above the calling page.


#3

I just wanna call some function if page will leave. Why does ionViewWillLeave event not work ? I don’t get it


#4

can you post your code? what’s your ionic version?