Skip to content

Instantly share code, notes, and snippets.

@NyaGarcia
Last active October 29, 2021 11:10
Show Gist options
  • Save NyaGarcia/fefeb0ded8cf40419c0cc56bb5699b52 to your computer and use it in GitHub Desktop.
Save NyaGarcia/fefeb0ded8cf40419c0cc56bb5699b52 to your computer and use it in GitHub Desktop.
Adding the 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),
},
{
path: 'dashboard',
loadChildren: () =>
import('./features/dashboard/dashboard.module').then(
(m) => m.DashboardModule
),
},
{
path: '**',
redirectTo: '',
pathMatch: 'full',
},
];
@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