import { NgModule } from '@angular/core'; import { RouterModule, Routes } from '@angular/router'; import { PageNotFoundComponent } from './page-not-found.component'; import { LandingComponent } from './landing/landing.component'; import { AuthComponent } from './auth/auth.component'; import { AuthModule } from './auth/auth.module'; const routes: Routes = [ { path: 'bom', loadChildren: () => import('./bom/bom.module').then(m => m.BomModule) }, { path: 'landing', component: LandingComponent }, { path: 'login', component: AuthComponent }, { path: '', redirectTo: 'landing', pathMatch: 'full' }, { path: '**', component: PageNotFoundComponent } ]; @NgModule({ imports: [RouterModule.forRoot(routes), AuthModule], exports: [RouterModule] }) export class AppRouterModule {}