24 lines
744 B
TypeScript
24 lines
744 B
TypeScript
|
import { NgModule } from '@angular/core';
|
||
|
import { Routes, RouterModule } from '@angular/router';
|
||
|
import {LoginComponent} from "./auth/login/login.component";
|
||
|
import {LogoutComponent} from "./auth/logout/logout.component";
|
||
|
import {HomeComponent} from "./home/home.component";
|
||
|
|
||
|
const routes: Routes = [
|
||
|
{
|
||
|
path: 'guest-book',
|
||
|
loadChildren: () => import('./guest-book/guest-book.module').then(mod => mod.GuestBookModule)
|
||
|
},
|
||
|
{path: 'login', component: LoginComponent},
|
||
|
{path: 'logout', component: LogoutComponent},
|
||
|
{path: '', component: HomeComponent},
|
||
|
];
|
||
|
@NgModule({
|
||
|
imports: [RouterModule.forRoot(routes,
|
||
|
{
|
||
|
onSameUrlNavigation: 'reload',
|
||
|
})],
|
||
|
exports: [RouterModule]
|
||
|
})
|
||
|
export class AppRoutingModule { }
|