import { NgModule } from '@angular/core' ; import { Routes , RouterModule } from '@angular/router' ; const routes = [ { path : '' , loadChildren : ( ) => import ( './login/login.module' ) . then ( ( m ) => m . LoginModule ) , } , { path : ':id' , loadChildren : ( ) => import ( './login/login.module' ) . then ( ( m ) => m . LoginModule ) , } , { path : 'game' , loadChildren : ( ) => import ( './game/game.module' ) . then ( ( m ) => m . GameModule ) , } , ] ; @ NgModule ( { imports : [ RouterModule . forRoot ( routes ) ] , exports : [ RouterModule ] , } ) export class AppRoutingModule { }