35 lines
915 B
TypeScript
35 lines
915 B
TypeScript
|
import { NgModule } from '@angular/core';
|
||
|
import { Routes, RouterModule } from '@angular/router';
|
||
|
import { AuthGuard } from '../_guards/auth.guard';
|
||
|
|
||
|
import { DashboardComponent } from './dashboard.component';
|
||
|
import { LeaderboardsComponent } from './leaderboards.component';
|
||
|
import { FullLayoutComponent } from '../layouts/full-layout.component';
|
||
|
|
||
|
// Using child path to allow for FullLayout theming
|
||
|
const routes: Routes = [
|
||
|
{
|
||
|
path: '',
|
||
|
component: FullLayoutComponent,
|
||
|
canActivate: [AuthGuard],
|
||
|
children: [
|
||
|
{
|
||
|
path: 'dashboard',
|
||
|
component: DashboardComponent,
|
||
|
data: { title: 'Dashboard' },
|
||
|
},
|
||
|
{
|
||
|
path: 'leaderboards',
|
||
|
component: LeaderboardsComponent,
|
||
|
data: { title: 'Leaderboards' },
|
||
|
}
|
||
|
],
|
||
|
}
|
||
|
];
|
||
|
|
||
|
@NgModule({
|
||
|
imports: [RouterModule.forChild(routes)],
|
||
|
exports: [RouterModule]
|
||
|
})
|
||
|
export class DashboardRoutingModule {}
|