import { NgModule } from '@angular/core';
import { RouterModule, Routes } from '@angular/router';
import {LayoutComponent} from "./shared/component/layout/layout.component";

const routes: Routes = [
  { path: '',
    redirectTo: '/homepage',
    pathMatch: 'full'
  },
  { path: '',
    component: LayoutComponent,
    children: [
      { path: 'homepage',
        loadChildren: () => import('./modules/homepage/home-page.module').then(m => m.HomePageModule)
      },
      { path: 'overview',
        loadChildren: () => import('./modules/overview/overview.module').then(m => m.OverviewModule)
      },
    ]
  },

];

@NgModule({
  imports: [RouterModule.forRoot(routes)],
  exports: [RouterModule]
})
export class AppRoutingModule { }
