Sitelet https://web.archive.org/web/20240920155746/https://angular.dev/api/router/CanActivate/
@angular/router

CanActivate

interface

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

  
    interface CanActivate {}
  
  
Jump to details