If I have a form in a view (Angular). When user tries to navigate away from there, and I want a confirmation message to appear. How can I do that?
CanDeactivate can be used for that. You need to pass the status to a service that is accessible to canDeactivate.
canDeactivate