I have a page that consists of a container component (parent) that contains a child component (child).
Each of them has a viewModel, I wanted to use the canDeactivate() hook in the child component to stop the user from leaving the page while he is editing something on the child component. However, the hook does not fire when the URL changes. It only fires when the hook is written in the parent component viewModel.
I’d like to know if its possible to fire the canDeactivate or some other methods to do the same thing but only on the child component viewModel?
Thank you in advance.