import { Routes } from '@angular/router'; import { DashboardComponent } from './pages/dashboard/dashboard.component'; import { LayoutsComponent } from './pages/dashboard/layouts/layouts.component'; import { AuthComponent } from './pages/auth/auth.component'; import { AuthGuard } from './cores/guards/auth.guard'; import { RegisterComponent } from './pages/register/register.component'; import { HistorygraphComponent } from './pages/dashboard/page/historygraph/historygraph.component'; import { ActualgraphComponent } from './pages/dashboard/page/actualgraph/actualgraph.component'; export const routes: Routes = [ { path: '', component: AuthComponent, }, { path: 'auth', component: AuthComponent }, { path: 'register', component: RegisterComponent }, { path: '', component: LayoutsComponent, children: [ { path: 'dashboard', component: DashboardComponent, canActivate: [AuthGuard] }, { path: 'historygraph', component: HistorygraphComponent, canActivate: [AuthGuard] }, { path: 'actualgraph', component: ActualgraphComponent, canActivate: [AuthGuard] } ] } ];