Skip to content

Instantly share code, notes, and snippets.

@NyaGarcia
Created October 21, 2021 14:20
Show Gist options
  • Save NyaGarcia/92e4b661ed8c4c3a327c24ba5883f672 to your computer and use it in GitHub Desktop.
Save NyaGarcia/92e4b661ed8c4c3a327c24ba5883f672 to your computer and use it in GitHub Desktop.
Adding lazy loaded auth module to the app routing module
import { RouterModule, Routes } from '@angular/router';
import { NgModule } from '@angular/core';
const routes: Routes = [
{
path: '',
loadChildren: () =>
import('./features/auth/auth.module').then((m) => m.AuthModule),
},
];
@NgModule({
imports: [RouterModule.forRoot(routes)],
exports: [RouterModule],
})
export class AppRoutingModule {}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment