Added GameModule

This commit is contained in:
2020-07-23 14:53:03 +02:00
parent 44575a8a08
commit 8d2df73484
33 changed files with 187 additions and 13 deletions

View File

@@ -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: '' },
];