import { NgModule } from '@angular/core';
import { RouterModule, Routes } from '@angular/router';

const routes: Routes = [

  {
    path: "", redirectTo: "/lesson/community", pathMatch: "full"
  },
  {
    path: 'user',
    loadChildren: () => import('../modules/user/user.module').then(m => m.UserModule)
  }
];

@NgModule({
  imports: [RouterModule.forRoot(routes)],
  exports: [RouterModule]
})
export class AppRoutingModule { }

let lessonRoute = {

  path: 'lesson',
  loadChildren: () => import('../modules/lesson/lesson.module').then(m => m.LessonModule)

}

routes.push(lessonRoute)