From 78f4defdc29d890c754d05a6c5db1e1d4afa8417 Mon Sep 17 00:00:00 2001 From: Daniel Ponte Date: Fri, 22 Nov 2024 15:13:34 -0500 Subject: [PATCH] Fix routing --- client/admin/src/app/app.routes.ts | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/client/admin/src/app/app.routes.ts b/client/admin/src/app/app.routes.ts index c424e29..d198241 100644 --- a/client/admin/src/app/app.routes.ts +++ b/client/admin/src/app/app.routes.ts @@ -12,11 +12,13 @@ import { AuthGuard } from './auth.guard'; export const routes: Routes = [ { path: 'login', component: LoginComponent }, - { path: '', component: HomeComponent, canActivate: [AuthGuard] }, - { path: 'talkgroups', component: TalkgroupsComponent }, - { path: 'talkgroups/import', component: ImportComponent }, - { path: 'talkgroups/:sys/:tg', component: TalkgroupRecordComponent }, - { path: 'calls', component: CallsComponent }, - { path: 'incidents', component: IncidentsComponent }, - { path: 'alerts', component: AlertsComponent }, + { path: '', canActivateChild: [AuthGuard], children: [ + { path: '', component: HomeComponent, pathMatch: 'full' }, + { path: 'talkgroups', component: TalkgroupsComponent }, + { path: 'talkgroups/import', component: ImportComponent }, + { path: 'talkgroups/:sys/:tg', component: TalkgroupRecordComponent }, + { path: 'calls', component: CallsComponent }, + { path: 'incidents', component: IncidentsComponent }, + { path: 'alerts', component: AlertsComponent }, + ]}, ];