In this section, we will talk about another powerful feature of the Angular framework. We call it guards, or even better, route guards.
It is available in the Angular CLI, as we will see in the following lines of code, but first let's understand a bit more about guards.
Protecting routes is a very common task when building modern web applications, as we want to prevent our users from accessing areas that they're not allowed to access, in our case, the bike details. Remember that we define the access to bike details inside ./Server/app/Http/Controllers/API/BikeController.php:
/** * Protect update and delete methods, only for authenticated
users. * * @return Unauthorized */ public function __construct() { $this->middleware('auth:api...