I have routing as below:
{
path: "home",
children: [{
path: "dashboard",
children: [{
path: "user",
canDeactivate: [CanWeDeactivateThis]
}]
}]
}
There are components defined in routes, above is just a simple snapshot. I get component as null when I add can deactivate in user path but if I add it on dashboard path it works well. Adding in the dashboard does not work for me, as I have multiple children on the dashboard and I need show confirmation if the user navigates to them as well.
Not sure how to resolve this one.
The angular version is 6.1.0
I followed this thread but no help.
Cany anyone help please?
BTW, the above routing definitions is part of a lazy loaded angular module.