ionViewCanLeave only when page is poping out?


#1

Hi

Currently it seems that the behaviour of ionViewCanLeave is to be invoked in two cases

  1. the current page is about to be pop out from the nav stack
  2. We push one more page above the the current page (modal also trigger that)

Is there a way to the invoke the ionViewCanLeave only when trying to poop out the current page?
or to do something like this?

ionViewCanLeave() { //is there a way to know if this is true? if (pageAboutToPop) { // here i do some stuff } }