Skip to content

Instantly share code, notes, and snippets.

@labidiaymen
Created June 9, 2022 16:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save labidiaymen/35fd2acb26b0577ddfaa4f1d1cf42ae1 to your computer and use it in GitHub Desktop.
Save labidiaymen/35fd2acb26b0577ddfaa4f1d1cf42ae1 to your computer and use it in GitHub Desktop.
import { NgModule } from '@angular/core';
import { RouterModule, Routes } from '@angular/router';
const routes: Routes = [
{
path: '',
loadComponent: () =>
import('./user-detail/user-detail.component').then(
({ UserDetailComponent }) => UserDetailComponent
),
},
];
@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