Guarding Guest Routes
In this lesson, we'll redirect the user away from the login and registration forms if they are logged in.
We'll cover the following...
We’re going to add another router guard for routes that are for guests only. We want to redirect the user to the secret page if they are already logged in. The process will be similar to before. We’ll apply a guard to the route with a pipe to change its behavior. Let’s get started.
Creating a pipe
We’ll be using the AngularFireAuthGuard
again. Before we do, let’s create the pipe to modify its behavior. The AngularFire package ...