How can you ensure that a user is redirected to a login page when attempting to access a protected child route without proper authentication?

  • Use 'canActivate' Route Guard and return 'false' on unauthorized
  • Use 'canActivateChild' Route Guard and return 'false' on unauthorized
  • Use 'canDeactivate' Route Guard and return 'false' on unauthorized
  • Use 'canLoad' Route Guard and return 'false' on unauthorized
To ensure users are redirected to a login page when accessing a protected child route without proper authentication, you use 'canActivate' and return 'false.'
Add your answer
Loading...

Leave a comment

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