Fixed bug with admin routes never loading. Added basic library view.
This commit is contained in:
parent
3f8a4d7866
commit
79a23ac406
8 changed files with 31 additions and 6 deletions
|
|
@ -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'}
|
||||
];
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue