In Angular's Router, what is the role of a `CanDeactivate` guard?
-
A
Prevents navigation to a route if the user is not authenticated
-
B
Prevents leaving a route, useful for unsaved-changes warnings
-
C
Lazy-loads a child module before activating the route
-
D
Resolves data before the component is displayed