• Overview
@angular/router

CanDeactivate

interface

Interface that a class can implement to be a guard deciding if a route can be deactivated. If all guards return true, navigation continues. If any guard returns false, navigation is cancelled. If any guard returns a UrlTree, current navigation is cancelled and a new navigation begins to the UrlTree returned from the guard.

  
    interface CanDeactivate<T> {}
  
  

canDeactivate

@paramcomponentT
@paramcurrentRouteActivatedRouteSnapshot
@paramcurrentStateRouterStateSnapshot
@paramnextStateRouterStateSnapshot
Jump to details