Remove Authentication
How to remove authentication login page.
This section explains how to bypass the login page and go directly to the dashboard page.
Update route at: 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] }
},
....
]
},
...
]
Changed the navigation path from the landing page to the login page, to now redirect from the landing page to the dashboard page
Last updated