How can you redirect a user to another route within a CanActivate guard if they are not authorized?

  • Using the CanActivate.redirect method
  • Using the Route.navigate method
  • Using the Router.navigate method
  • Using the Router.redirect method
In a CanActivate guard, you can redirect a user to another route by using the Router.navigate method. This allows you to navigate the user to a different route if they are not authorized to access the current route.
Add your answer
Loading...

Leave a comment

Your email address will not be published. Required fields are marked *