There are a lot of cases where we'll want to prevent a user from accessing a certain route unless some condition is fulfilled. When it comes to authentication, that condition is commonly seen whether or not the user is logged in. We can use Angular's CanActivate route guard to prevent users from accessing a certain route unless they are authenticated.

 

I finished! On to the next tutorial