import { NgModule } from '@angular/core'; import { Routes, RouterModule } from '@angular/router'; import { LoginPageComponent } from './components/login.page.component'; import { AppAutoLoginGuard } from '@app/guards/auto-login.guard'; const routes: Routes = [ { path: '', redirectTo: '/account/login', pathMatch: 'full' }, { path: 'login', component: LoginPageComponent, canActivate: [AppAutoLoginGuard] } ]; @NgModule({ imports: [RouterModule.forChild(routes)], exports: [RouterModule] }) export class AppAccountRoutingPageModule {}