22 lines
719 B
TypeScript
22 lines
719 B
TypeScript
import { NgModule } from '@angular/core';
|
|
import { Routes, RouterModule } from '@angular/router';
|
|
import { HomeComponent } from './home/home.component';
|
|
import { LibraryComponent } from './library/library.component';
|
|
import { AdminGuard } from './_guards/admin.guard';
|
|
|
|
const routes: Routes = [
|
|
{path: '', component: HomeComponent},
|
|
{
|
|
path: 'admin',
|
|
loadChildren: () => import('./admin/admin.module').then(m => m.AdminModule)
|
|
},
|
|
{path: 'library', component: LibraryComponent},
|
|
{path: 'home', component: HomeComponent},
|
|
{path: '**', component: HomeComponent, pathMatch: 'full'}
|
|
];
|
|
|
|
@NgModule({
|
|
imports: [RouterModule.forRoot(routes)],
|
|
exports: [RouterModule]
|
|
})
|
|
export class AppRoutingModule { }
|