ionViewCanLeave next view

Hi guys,
I’m trying to avoid user to navigate from state A -> B. Within the A.ionViewCanLeave() I need to know if I’m moving towards B but I don’t know how to find this info!
Anyone can help me? Plz

How exactly does one “go to B”? Does the user click a specific button?

The user clicks a button to go to B. I need to avoid it in certain conditions.
I need to know the destination view.

Seems like the most straightforward solution, which would also be most intuitive for users, is to bind the [disabled] attribute on that button to something in the component code that tells whether it is or isn’t OK to go to B. That’s typically how stuff like form validation works, which sounds pretty similar to your situation.

Thanks but this is not a solution for me.
I need to enable certians states in the ionViewCanLeave.

Whatever. If you overly narrow your problem description, you cut off many avenues of assistance. Good luck.

During a wizard, made of many views, I need to know if a view can go to another one.
A - > B - > C - > D
In this process the user can use the menu of the app to navigate away. I need to block the user to navigate away but I need to agree the user to navigate the wizard.
Hope to be more clear.
Tnx