Hey Community.
You can use canDeactivate to check whether navigation is allowed. But the problem is that the destination path is already in the browser location. If canDeactivate returns false, the navigation goes back again. Is it possible to somehow prevent the behavior that the path is already set, or is there perhaps another hook.
In the image “produktliste” is the destination where it is not allowed to navigate to. When canDeactivate is exited, the path changes again.