Functional CanDeactivate Guards in Angular
tldr; CanDeactivate guards in Angular can be very helpful in your app. Preventing users from leaving a route can keep the user from losing their progress on a form or something similar. Angular makes it easy with the CanDeactivate guard, and they’re even more straight-forward to write with the (not-so-new anymore) format of functional guards. …