Added GameModule
This commit is contained in:
@@ -1,15 +1,20 @@
|
||||
import { NgModule } from '@angular/core';
|
||||
import { Routes, RouterModule } from '@angular/router';
|
||||
|
||||
import { AppComponent } from './app.component';
|
||||
import { AuthGuard } from './account/auth.guard';
|
||||
import { LoginComponent } from './account/login/login.component';
|
||||
import { RegisterComponent } from './account/register/register.component';
|
||||
|
||||
|
||||
const gameModule = () => import('./game/game.module').then(x => x.GameModule);
|
||||
|
||||
const routes: Routes = [
|
||||
{ path: '', component: AppComponent, canActivate: [AuthGuard] },
|
||||
// { path: '', redirectTo: '/game', pathMatch: 'prefix', canActivate: [AuthGuard] },
|
||||
{ path: 'login', component: LoginComponent },
|
||||
{ path: 'register', component: RegisterComponent },
|
||||
{ path: 'game', loadChildren: gameModule, canActivate: [AuthGuard] },
|
||||
{ path: '**', redirectTo: '' },
|
||||
];
|
||||
|
||||
|
||||
Reference in New Issue
Block a user