In an e-commerce application, certain routes should only be accessible after a user logs in. To check the user's authentication status before allowing them to access these routes, which Route Guard would you use?

  • CanActivate
  • CanActivateChild
  • CanLoad
  • Resolve
The CanActivate route guard is used to protect routes based on whether a user is authenticated or not. It's commonly used to restrict access to routes that require user authentication.
Add your answer
Loading...

Leave a comment

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