Fixed bug with admin routes never loading. Added basic library view.

This commit is contained in:
Joseph Milazzo 2020-12-15 11:07:19 -06:00
parent 3f8a4d7866
commit 79a23ac406
8 changed files with 31 additions and 6 deletions

View file

@ -1,16 +1,16 @@
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',
runGuardsAndResolvers: 'always',
canActivate: [AdminGuard],
loadChildren: () => import('./admin/admin.module').then(m => m.AdminModule)
},
{path: 'library', component: LibraryComponent},
{path: '**', component: HomeComponent, pathMatch: 'full'}
];