<!doctypehtml><htmllang="en"> <head> <title>Dashboard | Datta Able Angular 20+ Template</title><!-- HTML5 Shim and Respond.js IE11 support of HTML5 elements and media queries --><!-- WARNING: Respond.js doesn't work if you view the page via file:// --><!--[if lt IE 11]> <script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script> <script src="https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"></script> <![endif]--> <basehref="/" /><!-- Meta --> <metacharset="utf-8" /> <metaname="viewport"content="width=device-width, initial-scale=1, user-scalable=0, minimal-ui" /> <metahttp-equiv="X-UA-Compatible"content="IE=edge" /> <metaname="description"title="Datta Able Angular Admin Template"content="Datta Able Angular 20 is an admin template made with Bootstrap 5 and ng-bootstrap 18. It includes a wide range of features, pre-built pages, and UI components to start your next project." /> <metaname="keywords"content="Admin templates, Bootstrap Admin templates, Angular 20+, bootstrap 5.x.x, Dashboard, Dashboard Templates, sass admin templates, html admin templates, Responsive, Bootstrap Admin templates free download, Angular 20 Admin templates free download,premium Bootstrap Admin templates, premium Angular 20 Admin templates download" /> <metaname="author"content="CodedThemes" /> <linkrel="icon"type="image/x-icon"href="favicon.ico" /><!-- font style --> <linkhref="https://fonts.googleapis.com/css?family=Open+Sans:300,400,600"rel="stylesheet" /> </head> <body> <app-root></app-root> </body></html>
../src/app/app.component.html
app.component.html
<router-outlet>
<!-- loadChildren from app-routing.module.ts with admin.component.html or auth.component.html -->
</router-outlet>
../src/app/app-routing.module.ts
app-routing.module.ts
import { AdminComponent } from './theme/layout/admin/admin.component';
import { GuestComponent } from './theme/layout/guest/guest.component';
import { AuthGuard } from './theme/shared/_helpers/auth.guard';
const routes: Routes = [
{
path: '',
component: AdminComponent,
canActivate: [AuthGuard],
children: [
// load children modules with lazy load routing for header, side nav common structure, like, dashboard, blank page, widget, etc..
]
},
{
path: '',
component: GuestComponent,
children: [
// load children modules with lazy load routing for without common structure, like login, signup, reset password, lock screen, etc..
]
},
{
path: '**',
loadComponent: () => import('./demo/pages/maintenance/error/error.component').then((c) => c.ErrorComponent)
}
];
<router-outlet>
<!-- loadChildren component for guest.component at app-routing.module.ts for authentication blank pages without nav, header, etc. -->
</router-outlet>