This section explains how to bypass the login page and go directly to the dashboard page.
src/app/app-routing.module.ts
```
// Angular Imports
import { NgModule } from '@angular/core';
import { Routes, RouterModule } from '@angular/router';
// project import
import { AdminComponent } from './theme/layout/admin/admin.component';
import { GuestComponent } from './theme/layout/guest/guest.component';
// import { AuthGuardChild } from './theme/shared/_helpers/auth.guard';
import { Role } from './theme/shared/_helpers/role';
const routes: Routes = [
....
{
path: '',
component: AdminComponent,
// canActivateChild: [AuthGuardChild], <!-- Commented to AuthGuardChild -->
children: [
{
path: '',
loadComponent: () => import('./demo/dashboard/default/default.component').then((c) => c.DefaultComponent),
data: { roles: [Role.Admin, Role.User] }
},
....
]
},
...
]
src/app/demo/pages/landing/landing.component.html
Form:
<a [routerLink]="['/login']" class="btn btn-secondary me-2">
<div class="d-flex alien-item-center">
<i class="ti ti-player-play-filled me-2"></i>
<span>Live Preview</span>
</div>
</a>
To:
<a [routerLink]="['/default']" class="btn btn-secondary me-2">
<div class="d-flex alien-item-center">
<i class="ti ti-player-play-filled me-2"></i>
<span>Live Preview</span>
</div>
</a>