Conclusion on Route Guard: AuthGuard

Let's upload our updated application to GitHub and conclude this chapter.

We'll cover the following

What have we done so far?

In this chapter:

  1. We saw how routes can be restricted to certain users using route guards that are provided by Angular.
  2. By adding a new isLoggedIn method to AuthService we were then able to use this method within our route guard to restrict the dashboard to authorized, logged-in users.
  3. Users who aren’t logged in are redirected elsewhere (the home page for now) preventing them from accessing portions of our app they shouldn’t be able to see.

Get hands-on with 1200+ tech skills courses.